Skip to content

Commit f7f8923

Browse files
authored
Merge branch 'main' into add-frontend-speech-recognition
2 parents 8695e21 + 369b92b commit f7f8923

3 files changed

Lines changed: 224 additions & 7 deletions

File tree

custom/composables/agentStore/useAgentSessions.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import type { Chat } from '../../chat';
44
import type { IAgentSession, ISessionsListItem, IPart } from '../../types';
55
import { PRE_SESSION_ID } from './constants';
66
import { ChatStatus } from 'ai';
7+
import { useI18n } from 'vue-i18n';
8+
79
type AdminforthLike = {
810
confirm(options: { message: string; yes: string; no: string }): Promise<boolean>;
911
};
@@ -41,6 +43,7 @@ export function createAgentSessionManager({
4143
return [...sessionsListToSort].sort((a: ISessionsListItem, b: ISessionsListItem) => b.timestamp.localeCompare(a.timestamp));
4244
}
4345

46+
const { t } = useI18n();
4447
function saveCurrentSessionInCache() {
4548
if (currentSession.value) {
4649
currentSession.value.messages = currentChat.value?.messages.map((m: any) => ({
@@ -170,7 +173,7 @@ export function createAgentSessionManager({
170173
return;
171174
}
172175
blockCloseOfChat.value = true;
173-
const isConfirmed = await adminforth.confirm({message: 'Are you sure, that you want to delete this session?', yes: 'Yes', no: 'No'});
176+
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'});
174177
blockCloseOfChat.value = false;
175178
if (!isConfirmed) {
176179
return;

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"dayjs": "^1.11.20",
3838
"langchain": "^1.3.3",
3939
"multer": "^2.1.1",
40+
"vue-i18n": "^11.4.0",
4041
"yaml": "^2.8.3",
4142
"zod": "^4.3.6"
4243
},

0 commit comments

Comments
 (0)