Merge branch 'channel' into cv-channel-urci3p
This commit is contained in:
@@ -42,7 +42,7 @@ import {
|
||||
CONNECTION_IDLE_TIMEOUT_MS,
|
||||
IDLE_SWEEP_INTERVAL_MS,
|
||||
} from "@/lib/constants"
|
||||
import { notifyTurnComplete } from "@/lib/notification"
|
||||
import { sendSystemNotification } from "@/lib/notification"
|
||||
import {
|
||||
applySavedModePreference,
|
||||
applySavedConfigPreferences,
|
||||
@@ -1704,7 +1704,7 @@ export function AcpConnectionsProvider({ children }: { children: ReactNode }) {
|
||||
const agentLabel = AGENT_LABELS[nc.agentType]
|
||||
const fn = folderNameRef.current
|
||||
const title = fn ? `${fn} - Codeg` : "Codeg"
|
||||
notifyTurnComplete(
|
||||
sendSystemNotification(
|
||||
title,
|
||||
t("notificationTurnComplete", { agent: agentLabel })
|
||||
).catch(() => {})
|
||||
@@ -1712,11 +1712,28 @@ export function AcpConnectionsProvider({ children }: { children: ReactNode }) {
|
||||
}
|
||||
break
|
||||
}
|
||||
case "error":
|
||||
case "error": {
|
||||
flushStreamingQueue()
|
||||
dispatch({ type: "ERROR", contextKey, message: e.message })
|
||||
pushAlertRef.current("error", t("eventErrorTitle"), e.message)
|
||||
// Send OS notification for agent errors
|
||||
{
|
||||
const nc = storeRef.current.connections.get(contextKey)
|
||||
if (nc) {
|
||||
const agentLabel = AGENT_LABELS[nc.agentType]
|
||||
const fn = folderNameRef.current
|
||||
const title = fn ? `${fn} - Codeg` : "Codeg"
|
||||
sendSystemNotification(
|
||||
title,
|
||||
t("notificationError", {
|
||||
agent: agentLabel,
|
||||
message: e.message,
|
||||
})
|
||||
).catch(() => {})
|
||||
}
|
||||
}
|
||||
break
|
||||
}
|
||||
case "available_commands":
|
||||
flushStreamingQueue()
|
||||
dispatch({
|
||||
|
||||
@@ -1350,7 +1350,8 @@
|
||||
"connectFailedTitle": "فشل اتصال {agent}",
|
||||
"toolFallbackTitle": "أداة",
|
||||
"eventErrorTitle": "خطأ الوكيل",
|
||||
"notificationTurnComplete": "{agent} أنهى الاستجابة"
|
||||
"notificationTurnComplete": "{agent} أنهى الاستجابة",
|
||||
"notificationError": "{agent} خطأ: {message}"
|
||||
},
|
||||
"connectionLifecycle": {
|
||||
"tasks": {
|
||||
|
||||
@@ -1350,7 +1350,8 @@
|
||||
"connectFailedTitle": "{agent} Verbindung fehlgeschlagen",
|
||||
"toolFallbackTitle": "Werkzeug",
|
||||
"eventErrorTitle": "Agentenfehler",
|
||||
"notificationTurnComplete": "{agent} hat die Antwort abgeschlossen"
|
||||
"notificationTurnComplete": "{agent} hat die Antwort abgeschlossen",
|
||||
"notificationError": "{agent} Fehler: {message}"
|
||||
},
|
||||
"connectionLifecycle": {
|
||||
"tasks": {
|
||||
|
||||
@@ -1351,7 +1351,8 @@
|
||||
"connectFailedTitle": "{agent} connection failed",
|
||||
"toolFallbackTitle": "Tool",
|
||||
"eventErrorTitle": "Agent Error",
|
||||
"notificationTurnComplete": "{agent} has finished responding"
|
||||
"notificationTurnComplete": "{agent} has finished responding",
|
||||
"notificationError": "{agent} error: {message}"
|
||||
},
|
||||
"connectionLifecycle": {
|
||||
"tasks": {
|
||||
|
||||
@@ -1350,7 +1350,8 @@
|
||||
"connectFailedTitle": "Falló la conexión de {agent}",
|
||||
"toolFallbackTitle": "Herramienta",
|
||||
"eventErrorTitle": "Error del agente",
|
||||
"notificationTurnComplete": "{agent} ha terminado de responder"
|
||||
"notificationTurnComplete": "{agent} ha terminado de responder",
|
||||
"notificationError": "{agent} error: {message}"
|
||||
},
|
||||
"connectionLifecycle": {
|
||||
"tasks": {
|
||||
|
||||
@@ -1350,7 +1350,8 @@
|
||||
"connectFailedTitle": "Échec de la connexion de {agent}",
|
||||
"toolFallbackTitle": "Outil",
|
||||
"eventErrorTitle": "Erreur de l'agent",
|
||||
"notificationTurnComplete": "{agent} a terminé de répondre"
|
||||
"notificationTurnComplete": "{agent} a terminé de répondre",
|
||||
"notificationError": "{agent} erreur : {message}"
|
||||
},
|
||||
"connectionLifecycle": {
|
||||
"tasks": {
|
||||
|
||||
@@ -1350,7 +1350,8 @@
|
||||
"connectFailedTitle": "{agent} の接続に失敗しました",
|
||||
"toolFallbackTitle": "ツール",
|
||||
"eventErrorTitle": "エージェントエラー",
|
||||
"notificationTurnComplete": "{agent} の応答が完了しました"
|
||||
"notificationTurnComplete": "{agent} の応答が完了しました",
|
||||
"notificationError": "{agent} エラー:{message}"
|
||||
},
|
||||
"connectionLifecycle": {
|
||||
"tasks": {
|
||||
|
||||
@@ -1350,7 +1350,8 @@
|
||||
"connectFailedTitle": "{agent} 연결 실패",
|
||||
"toolFallbackTitle": "도구",
|
||||
"eventErrorTitle": "에이전트 오류",
|
||||
"notificationTurnComplete": "{agent} 응답이 완료되었습니다"
|
||||
"notificationTurnComplete": "{agent} 응답이 완료되었습니다",
|
||||
"notificationError": "{agent} 오류: {message}"
|
||||
},
|
||||
"connectionLifecycle": {
|
||||
"tasks": {
|
||||
|
||||
@@ -1350,7 +1350,8 @@
|
||||
"connectFailedTitle": "Falha na conexão de {agent}",
|
||||
"toolFallbackTitle": "Ferramenta",
|
||||
"eventErrorTitle": "Erro do agente",
|
||||
"notificationTurnComplete": "{agent} terminou de responder"
|
||||
"notificationTurnComplete": "{agent} terminou de responder",
|
||||
"notificationError": "{agent} erro: {message}"
|
||||
},
|
||||
"connectionLifecycle": {
|
||||
"tasks": {
|
||||
|
||||
@@ -1351,7 +1351,8 @@
|
||||
"connectFailedTitle": "{agent} 连接失败",
|
||||
"toolFallbackTitle": "工具",
|
||||
"eventErrorTitle": "Agent 错误",
|
||||
"notificationTurnComplete": "{agent} 已完成响应"
|
||||
"notificationTurnComplete": "{agent} 已完成响应",
|
||||
"notificationError": "{agent} 错误:{message}"
|
||||
},
|
||||
"connectionLifecycle": {
|
||||
"tasks": {
|
||||
|
||||
@@ -1350,7 +1350,8 @@
|
||||
"connectFailedTitle": "{agent} 連線失敗",
|
||||
"toolFallbackTitle": "工具",
|
||||
"eventErrorTitle": "Agent 錯誤",
|
||||
"notificationTurnComplete": "{agent} 已完成回應"
|
||||
"notificationTurnComplete": "{agent} 已完成回應",
|
||||
"notificationError": "{agent} 錯誤:{message}"
|
||||
},
|
||||
"connectionLifecycle": {
|
||||
"tasks": {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { getTransport } from "./transport"
|
||||
import { isDesktop } from "./transport"
|
||||
|
||||
export async function notifyTurnComplete(
|
||||
export async function sendSystemNotification(
|
||||
title: string,
|
||||
body: string
|
||||
): Promise<void> {
|
||||
|
||||
Reference in New Issue
Block a user