Skip to content

Commit d92f13b

Browse files
committed
merged some changes
1 parent 006bec9 commit d92f13b

File tree

7 files changed

+22
-20
lines changed

7 files changed

+22
-20
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ XAgentServer/logs/
1212
XAgentServer/prod_server_envs.py
1313

1414
XAgentWeb/node_modules
15+
**/node_modules/
1516
XAgentWeb/dist
1617

1718
.DS_Store

XAgentWeb/index.html

+8-8
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
<title>
1111
XAgent
1212
</title>
13-
<script defer src="/third/notebook-js/vendor/es5-shim.min.js"></script>
14-
<script defer src="/third/notebook-js/vendor/marked.min.js"></script>
15-
<script defer src="/third/notebook-js/vendor/purify.min.js"></script>
16-
<script defer src="/third/notebook-js/vendor/ansi_up.min.js"></script>
17-
<script defer src="/third/notebook-js/vendor/prism.min.js"></script>
18-
<script defer src="/third/notebook-js/vendor/katex.min.js"></script>
19-
<script defer src="/third/notebook-js/vendor/katex-auto-render.min.js"></script>
20-
<script defer src="/third/notebook-js/vendor/notebook.min.js"></script>
13+
<script src="/third/notebook-js/vendor/es5-shim.min.js"></script>
14+
<script src="/third/notebook-js/vendor/marked.min.js"></script>
15+
<script src="/third/notebook-js/vendor/purify.min.js"></script>
16+
<script src="/third/notebook-js/vendor/ansi_up.min.js"></script>
17+
<script src="/third/notebook-js/vendor/prism.min.js"></script>
18+
<script src="/third/notebook-js/vendor/katex.min.js"></script>
19+
<script src="/third/notebook-js/vendor/katex-auto-render.min.js"></script>
20+
<script src="/third/notebook-js/vendor/notebook.min.js"></script>
2121
<link rel="stylesheet" href="/third/notebook-js/styles/vendor/katex.min.css" />
2222
<link rel="stylesheet" href="/third/notebook-js/styles/vendor/prism.css" />
2323
<link rel="stylesheet" href="/third/notebook-js/styles/notebook.css" />

XAgentWeb/src/composables/useApi.ts

+2-4
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ httpService.interceptors.response.use(
3535
(res: AxiosResponse) => {
3636
const authStore = useAuthStore()
3737
const userStore = useUserStore()
38-
const router = useRouter()
3938
// 1009 无效token 1005 用户不存在 1008 无效的token 1017用户不存在
4039
if ( res.status === 401
4140
// unauthorized
@@ -45,9 +44,8 @@ httpService.interceptors.response.use(
4544
// res?.data?.code === 1017 ||
4645
// res?.data?.code === 1018
4746
) {
48-
authStore.clearLoginState()
49-
userStore.clearUserInfo()
50-
router.push('/login')
47+
authStore.clearLoginState();
48+
userStore.clearUserInfo();
5149
}
5250
return res?.data
5351
},

XAgentWeb/src/views/playground/chat.vue

+4-6
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,6 @@ import throttle from '/@/utils/throttle'
125125
import Tab from './components/Tab.vue'
126126
import WorkSpace from './components/WorkSpace.vue'
127127
128-
const { proxy: global_instance } = getCurrentInstance() as any
129-
130128
const route = useRoute()
131129
const router = useRouter()
132130
const taskStore = useTaskStore()
@@ -179,7 +177,7 @@ let pageMode = computed(() => {
179177
}
180178
}
181179
return route.query.mode as string || '';
182-
}); // Redirected from other page, playback, review, or start a new conversation
180+
}); // 从其他页面跳转进来,是回放模式 还是浏览模式 还是开启一个新对话
183181
184182
185183
if(pageMode.value === "recorder") {
@@ -549,7 +547,7 @@ const newTalkConnection = () => {
549547
}
550548
}
551549
552-
// Input answer
550+
// 输入回答
553551
const sendMessage = async (val: string) => {
554552
if (!val) return
555553
chatMsgInfoStore.setCurrentInput(val)
@@ -966,7 +964,7 @@ const wormText = (params: IChatRequest, {tasks, costTime, msgId }: {tasks: any;
966964
costTimeMilli: costTime,
967965
subTasks: [],
968966
isLatest: true
969-
// Is the current inner the latest message
967+
// 当前的inenr是不是最新的那条信息
970968
}
971969
chatMsgInfo.value.forEach((item) => {
972970
item.isLatest = false
@@ -986,7 +984,7 @@ const wormText = (params: IChatRequest, {tasks, costTime, msgId }: {tasks: any;
986984
}
987985
988986
989-
// Regenerate the message
987+
// 执行重新生成操作
990988
const regenerate = () => {
991989
const input = currentInput.value
992990
sendMessage(input)

XAgentWeb/src/views/playground/components/HistorySidebar.vue

+6
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,12 @@ const isBetaUser = computed(() => true)
173173
174174
175175
176+
const {
177+
userInfo: userInfo
178+
} = storeToRefs(userStore)
179+
180+
const isBetaUser = true;
181+
176182
const { isRequestingAi } = storeToRefs(chatMsgInfoStore)
177183
const emits = defineEmits<{ (e: 'createTalk'): void; (e: 'clear'): void }>();
178184

XAgentWeb/src/views/playground/components/SubmitSubtaskInfo.vue

-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@
112112
:value="viewedCodeStr"
113113
:isShowLineNum="showLineNum"
114114
/>
115-
116115
<template v-slot:footer>
117116
<el-button
118117
type="primary"

XAgentWeb/src/views/playground/components/WorkSpace.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050

5151
<script setup lang="ts">
5252
53-
import { ref, onMounted } from 'vue'
53+
import { ref, onMounted, toRefs } from 'vue'
5454
import CodeViewer from './CodeViewer.vue'
5555
import PythonNotebookViewer from './PythonNotebookViewer.vue'
5656
import ImagesViewer from './ImagesViewer.vue'

0 commit comments

Comments
 (0)