+
|
{{ col.label }}
-
-
+ >
|
@@ -4627,52 +4625,52 @@ const handlePermissionImport = async (event: Event) => {
:key="r.id"
class="text-slate-700 transition hover:bg-slate-50"
>
- {{ r.run_no }} |
- {{ formatDateTime(r.started_at) }} |
- {{ formatDateTime(r.finished_at) }} |
-
+ | {{ r.run_no }} |
+ {{ formatDateTime(r.started_at) }} |
+ {{ formatDateTime(r.finished_at) }} |
+
{{ getScheduleRunStatusBadge(r.status).label }}
...
|
- {{ r.total_count }} |
- {{ r.success_count }} |
- {{ r.failed_count }} |
-
-
-
+ | {{ r.total_count }} |
+ {{ r.success_count }} |
+ {{ r.failed_count }} |
+
+
+
{{ $t('admin.schedule.notified') }}
- {{ $t('admin.schedule.notifyError') }}
+ {{ $t('admin.schedule.notifyError') }}
-
|
-
+ |
|
-
+ |
-
diff --git a/frontend/src/views/ChatView.vue b/frontend/src/views/ChatView.vue
index df9fbdcd..c3e132f2 100644
--- a/frontend/src/views/ChatView.vue
+++ b/frontend/src/views/ChatView.vue
@@ -25,6 +25,7 @@ import { useIsMobile } from '../composables/useIsMobile';
import { useTheme } from '../composables/useTheme';
import { getAuthHeaders, getStoredAuthUser, clearAuthUser } from '../utils/auth';
import { copyTextToClipboard } from '../utils/clipboard';
+import { setLastChatAgentId } from '../utils/lastChatAgent';
const { t, locale } = useI18n();
const { appliedTheme, toggleLightDark } = useTheme();
@@ -1876,10 +1877,18 @@ const loadUserAgents = async () => {
const switchToAgent = (agent: { id: number; name: string }) => {
if (agent.id === agentId) return;
+ setLastChatAgentId(agent.id);
const url = router.resolve(`/chat/${agent.id}`).href;
window.open(url, '_blank');
};
+const goToWorkspace = (view?: string) => {
+ setLastChatAgentId(Number(route.params.agentId));
+ const query: Record = { no_redirect: '1' };
+ if (view) query.view = view;
+ router.push({ path: '/workspace', query });
+};
+
// 组件挂载时,如果存在预设问题,则自动触发一次发送
onMounted(async () => {
document.addEventListener('mousedown', handleDocumentPointerDown);
@@ -1888,6 +1897,7 @@ onMounted(async () => {
document.addEventListener('touchstart', handleMobileAgentPopoverClickOutside, { passive: true });
window.addEventListener('resize', syncViewportWidth);
await syncCurrentUserProfile();
+ setLastChatAgentId(Number(route.params.agentId));
await loadAgent();
await loadUserAgents();
@@ -1907,6 +1917,14 @@ onMounted(async () => {
scheduleScrollChatToBottom();
});
+watch(
+ () => route.params.agentId,
+ (id) => {
+ const nextId = Number(id);
+ if (Number.isFinite(nextId) && nextId > 0) setLastChatAgentId(nextId);
+ }
+);
+
onBeforeUnmount(() => {
document.removeEventListener('mousedown', handleDocumentPointerDown);
document.removeEventListener('touchstart', handleDocumentPointerDown);
@@ -1983,7 +2001,7 @@ const showChatRating = ref(false);
{{ (currentUser?.username || 'I').charAt(0).toUpperCase() }}
-
+
@@ -2104,7 +2122,7 @@ const showChatRating = ref(false);
-
+
@@ -2122,7 +2140,7 @@ const showChatRating = ref(false);
- |