mirror of
https://github.com/open-webui/computer.git
synced 2026-12-04 02:28:04 -05:00
refac
This commit is contained in:
1 parent
490502a1e0
commit
4aafe5a0e4
17 files changed
+193
-16
No files matched your search
@@ -850,6 +850,12 @@
|
||||
"chat.speakResponses": "Antworten vorlesen",
|
||||
"chat.stopSpeaking": "Vorlesen stoppen",
|
||||
"chat.fallbackTitle": "Unterhaltung",
|
||||
"chat.notification.approvalTitle": "Genehmigung erforderlich: {{title}}",
|
||||
"chat.notification.inputTitle": "Eingabe erforderlich: {{title}}",
|
||||
"chat.notification.approvalBody": "Erlaube oder verweigere {{tool}}, um fortzufahren.",
|
||||
"chat.notification.inputBody": "Beantworte die Eingabeaufforderung, um fortzufahren.",
|
||||
"chat.notification.finishedBody": "Aufgabe abgeschlossen.",
|
||||
"chat.notification.thisTool": "dieses Tool",
|
||||
"chat.greeting": "Wie kann ich Ihnen helfen?",
|
||||
"admin.toolServers": "Tool-Server",
|
||||
"toolServers.title": "Tool-Server",
|
||||
|
||||
@@ -887,6 +887,12 @@
|
||||
"chat.speakResponses": "Speak responses",
|
||||
"chat.stopSpeaking": "Stop speaking",
|
||||
"chat.fallbackTitle": "Chat",
|
||||
"chat.notification.approvalTitle": "Approval needed: {{title}}",
|
||||
"chat.notification.inputTitle": "Input needed: {{title}}",
|
||||
"chat.notification.approvalBody": "Allow or deny {{tool}} to continue.",
|
||||
"chat.notification.inputBody": "Answer the prompt to continue.",
|
||||
"chat.notification.finishedBody": "Task finished.",
|
||||
"chat.notification.thisTool": "this tool",
|
||||
"chat.greeting": "What can I help you with?",
|
||||
"admin.toolServers": "Tool Servers",
|
||||
"toolServers.title": "Tool Servers",
|
||||
|
||||
@@ -850,6 +850,12 @@
|
||||
"chat.speakResponses": "Leer respuestas",
|
||||
"chat.stopSpeaking": "Detener lectura",
|
||||
"chat.fallbackTitle": "Conversación",
|
||||
"chat.notification.approvalTitle": "Aprobación necesaria: {{title}}",
|
||||
"chat.notification.inputTitle": "Entrada necesaria: {{title}}",
|
||||
"chat.notification.approvalBody": "Permite o deniega {{tool}} para continuar.",
|
||||
"chat.notification.inputBody": "Responde la solicitud para continuar.",
|
||||
"chat.notification.finishedBody": "Tarea finalizada.",
|
||||
"chat.notification.thisTool": "esta herramienta",
|
||||
"chat.greeting": "¿En qué puedo ayudarte?",
|
||||
"admin.toolServers": "Servidores de herramientas",
|
||||
"toolServers.title": "Servidores de herramientas",
|
||||
|
||||
@@ -850,6 +850,12 @@
|
||||
"chat.speakResponses": "Lire les réponses",
|
||||
"chat.stopSpeaking": "Arrêter la lecture",
|
||||
"chat.fallbackTitle": "Discussion",
|
||||
"chat.notification.approvalTitle": "Approbation requise : {{title}}",
|
||||
"chat.notification.inputTitle": "Saisie requise : {{title}}",
|
||||
"chat.notification.approvalBody": "Autorisez ou refusez {{tool}} pour continuer.",
|
||||
"chat.notification.inputBody": "Répondez à la demande pour continuer.",
|
||||
"chat.notification.finishedBody": "Tâche terminée.",
|
||||
"chat.notification.thisTool": "cet outil",
|
||||
"chat.greeting": "Comment puis-je vous aider ?",
|
||||
"admin.toolServers": "Serveurs d'outils",
|
||||
"toolServers.title": "Serveurs d'outils",
|
||||
|
||||
@@ -850,6 +850,12 @@
|
||||
"chat.speakResponses": "応答を読み上げる",
|
||||
"chat.stopSpeaking": "読み上げを停止",
|
||||
"chat.fallbackTitle": "チャット",
|
||||
"chat.notification.approvalTitle": "承認が必要: {{title}}",
|
||||
"chat.notification.inputTitle": "入力が必要: {{title}}",
|
||||
"chat.notification.approvalBody": "続行するには {{tool}} を許可または拒否してください。",
|
||||
"chat.notification.inputBody": "続行するにはプロンプトに回答してください。",
|
||||
"chat.notification.finishedBody": "タスクが完了しました。",
|
||||
"chat.notification.thisTool": "このツール",
|
||||
"chat.greeting": "何かお手伝いできますか?",
|
||||
"admin.toolServers": "ツールサーバー",
|
||||
"toolServers.title": "ツールサーバー",
|
||||
|
||||
@@ -850,6 +850,12 @@
|
||||
"chat.speakResponses": "응답 읽기",
|
||||
"chat.stopSpeaking": "읽기 중지",
|
||||
"chat.fallbackTitle": "채팅",
|
||||
"chat.notification.approvalTitle": "승인 필요: {{title}}",
|
||||
"chat.notification.inputTitle": "입력 필요: {{title}}",
|
||||
"chat.notification.approvalBody": "계속하려면 {{tool}}을(를) 허용하거나 거부하세요.",
|
||||
"chat.notification.inputBody": "계속하려면 프롬프트에 답하세요.",
|
||||
"chat.notification.finishedBody": "작업이 완료되었습니다.",
|
||||
"chat.notification.thisTool": "이 도구",
|
||||
"chat.greeting": "무엇을 도와드릴까요?",
|
||||
"admin.toolServers": "도구 서버",
|
||||
"toolServers.title": "도구 서버",
|
||||
|
||||
@@ -850,6 +850,12 @@
|
||||
"chat.speakResponses": "Ler respostas",
|
||||
"chat.stopSpeaking": "Parar leitura",
|
||||
"chat.fallbackTitle": "Conversa",
|
||||
"chat.notification.approvalTitle": "Aprovação necessária: {{title}}",
|
||||
"chat.notification.inputTitle": "Entrada necessária: {{title}}",
|
||||
"chat.notification.approvalBody": "Permita ou negue {{tool}} para continuar.",
|
||||
"chat.notification.inputBody": "Responda à solicitação para continuar.",
|
||||
"chat.notification.finishedBody": "Tarefa concluída.",
|
||||
"chat.notification.thisTool": "esta ferramenta",
|
||||
"chat.greeting": "Como posso ajudar?",
|
||||
"admin.toolServers": "Servidores de ferramentas",
|
||||
"toolServers.title": "Servidores de ferramentas",
|
||||
|
||||
@@ -850,6 +850,12 @@
|
||||
"chat.speakResponses": "Озвучивать ответы",
|
||||
"chat.stopSpeaking": "Остановить озвучивание",
|
||||
"chat.fallbackTitle": "Чат",
|
||||
"chat.notification.approvalTitle": "Требуется подтверждение: {{title}}",
|
||||
"chat.notification.inputTitle": "Требуется ввод: {{title}}",
|
||||
"chat.notification.approvalBody": "Разрешите или запретите {{tool}}, чтобы продолжить.",
|
||||
"chat.notification.inputBody": "Ответьте на запрос, чтобы продолжить.",
|
||||
"chat.notification.finishedBody": "Задача завершена.",
|
||||
"chat.notification.thisTool": "этот инструмент",
|
||||
"chat.greeting": "Чем могу помочь?",
|
||||
"admin.toolServers": "Серверы инструментов",
|
||||
"toolServers.title": "Серверы инструментов",
|
||||
|
||||
@@ -850,6 +850,12 @@
|
||||
"chat.speakResponses": "朗读响应",
|
||||
"chat.stopSpeaking": "停止朗读",
|
||||
"chat.fallbackTitle": "聊天",
|
||||
"chat.notification.approvalTitle": "需要批准:{{title}}",
|
||||
"chat.notification.inputTitle": "需要输入:{{title}}",
|
||||
"chat.notification.approvalBody": "允许或拒绝 {{tool}} 以继续。",
|
||||
"chat.notification.inputBody": "回答提示以继续。",
|
||||
"chat.notification.finishedBody": "任务已完成。",
|
||||
"chat.notification.thisTool": "此工具",
|
||||
"chat.greeting": "有什么可以帮您的?",
|
||||
"admin.toolServers": "工具服务器",
|
||||
"toolServers.title": "工具服务器",
|
||||
|
||||
@@ -850,6 +850,12 @@
|
||||
"chat.speakResponses": "朗讀回應",
|
||||
"chat.stopSpeaking": "停止朗讀",
|
||||
"chat.fallbackTitle": "聊天",
|
||||
"chat.notification.approvalTitle": "需要批准:{{title}}",
|
||||
"chat.notification.inputTitle": "需要輸入:{{title}}",
|
||||
"chat.notification.approvalBody": "允許或拒絕 {{tool}} 以繼續。",
|
||||
"chat.notification.inputBody": "回答提示以繼續。",
|
||||
"chat.notification.finishedBody": "任務已完成。",
|
||||
"chat.notification.thisTool": "此工具",
|
||||
"chat.greeting": "有什麼可以幫您的?",
|
||||
"admin.toolServers": "工具伺服器",
|
||||
"toolServers.title": "工具伺服器",
|
||||
|
||||
@@ -7,6 +7,7 @@ import { fetchJSON } from '$lib/apis';
|
||||
import { socketStore } from '$lib/stores/socket.svelte';
|
||||
import { activeTab } from '$lib/stores';
|
||||
import { getPathDisplayName, isSupportedWorkspacePath } from '$lib/utils/paths';
|
||||
import { i18next } from '$lib/i18n';
|
||||
|
||||
export const chatEnabled = writable<boolean>(false);
|
||||
|
||||
@@ -139,9 +140,11 @@ export function bindGlobalChatListener() {
|
||||
(data: {
|
||||
type?: string;
|
||||
chat_id: string;
|
||||
status?: string;
|
||||
done?: boolean;
|
||||
title?: string;
|
||||
content?: string;
|
||||
tool_name?: string;
|
||||
workspace?: string;
|
||||
workspace_name?: string;
|
||||
active?: boolean;
|
||||
@@ -187,8 +190,24 @@ export function bindGlobalChatListener() {
|
||||
const workspacePath = isSupportedWorkspacePath(data.workspace) ? data.workspace : '';
|
||||
const workspaceDisplayName = data.workspace_name || getPathDisplayName(workspacePath);
|
||||
const workspaceTitlePrefix = workspaceDisplayName ? `[${workspaceDisplayName}] ` : '';
|
||||
const title = `${workspaceTitlePrefix}${data.title || 'Chat'}`;
|
||||
const body = data.content || '';
|
||||
const chatTitle = data.title || i18next.t('chat.fallbackTitle');
|
||||
const approvalRequired = data.status === 'approval_required';
|
||||
const inputRequired = data.status === 'input_required';
|
||||
const toolName = data.tool_name?.replace(/_/g, ' ');
|
||||
const title = approvalRequired
|
||||
? `${workspaceTitlePrefix}${i18next.t('chat.notification.approvalTitle', { title: chatTitle })}`
|
||||
: inputRequired
|
||||
? `${workspaceTitlePrefix}${i18next.t('chat.notification.inputTitle', { title: chatTitle })}`
|
||||
: `${workspaceTitlePrefix}${chatTitle}`;
|
||||
const body =
|
||||
data.content ||
|
||||
(approvalRequired
|
||||
? i18next.t('chat.notification.approvalBody', {
|
||||
tool: toolName || i18next.t('chat.notification.thisTool')
|
||||
})
|
||||
: inputRequired
|
||||
? i18next.t('chat.notification.inputBody')
|
||||
: i18next.t('chat.notification.finishedBody'));
|
||||
const openChat = async () => {
|
||||
const { goto } = await import('$app/navigation');
|
||||
const workspaceQuery = workspacePath
|
||||
|
||||
Reference in new issue
Block a user