Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion custom/composables/agentStore/useAgentSessions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import type { ComputedRef, Ref, ShallowRef } from 'vue';
import { callAdminForthApi } from '@/utils';
import type { Chat } from '../../chat';
import type { IAgentSession, ISessionsListItem, IPart } from '../../types';
import { useI18n } from 'vue-i18n';

type AdminforthLike = {
confirm(options: { message: string; yes: string; no: string }): Promise<boolean>;
Expand Down Expand Up @@ -40,6 +41,7 @@ export function createAgentSessionManager({
return [...sessionsListToSort].sort((a: ISessionsListItem, b: ISessionsListItem) => b.timestamp.localeCompare(a.timestamp));
}

const { t } = useI18n();
function saveCurrentSessionInCache() {
if (currentSession.value) {
currentSession.value.messages = currentChat.value?.messages.map((m: any) => ({
Expand Down Expand Up @@ -169,7 +171,7 @@ export function createAgentSessionManager({
return;
}
blockCloseOfChat.value = true;
const isConfirmed = await adminforth.confirm({message: 'Are you sure, that you want to delete this session?', yes: 'Yes', no: 'No'});
const isConfirmed = await adminforth.confirm({title: t('Are you sure, that you want to delete this session?'), message: t('This process is irreversible.'), yes: 'Yes', no: 'No'});
blockCloseOfChat.value = false;
if (!isConfirmed) {
return;
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"adminforth": "2.51.0",
"dayjs": "^1.11.20",
"langchain": "^1.3.3",
"vue-i18n": "^11.4.0",
"yaml": "^2.8.3",
"zod": "^4.3.6"
},
Expand Down
Loading