Skip to content

Commit e1fafd6

Browse files
committed
fix: code review
1 parent ff6b1d3 commit e1fafd6

File tree

7 files changed

+49
-46
lines changed

7 files changed

+49
-46
lines changed

src/main/presenter/llmProviderPresenter/agent/acpProcessManager.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,12 +1037,6 @@ export class AcpProcessManager implements AgentProcessManager<AcpProcessHandle,
10371037
this.agentLocks.set(agentId, currentLock)
10381038
await previousLock
10391039

1040-
// Debug: show queued locks count for the agent
1041-
const queued = this.agentLocks.has(agentId) ? 1 : 0
1042-
if (queued > 1) {
1043-
console.info(`[ACP] Agent ${agentId} lock queue depth: ${queued}`)
1044-
}
1045-
10461040
return () => {
10471041
releaseResolver?.()
10481042
if (this.agentLocks.get(agentId) === currentLock) {

src/main/presenter/llmProviderPresenter/providers/acpProvider.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,15 @@ export class AcpProvider extends BaseAgentProvider<
493493
let disposePermission: (() => void) | undefined
494494

495495
const attachSession = (sessionId: string) => {
496+
if (disposeNotification) {
497+
disposeNotification()
498+
disposeNotification = undefined
499+
}
500+
if (disposePermission) {
501+
disposePermission()
502+
disposePermission = undefined
503+
}
504+
496505
disposeNotification = this.processManager.registerSessionListener(
497506
agent.id,
498507
sessionId,

src/renderer/src/i18n/da-DK/settings.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -946,23 +946,23 @@
946946
"copyFailed": "Kunne ikke kopiere"
947947
},
948948
"debug": {
949-
"clearHistory": "klar rekord",
950-
"close": "lukning",
949+
"clearHistory": "Ryd historik",
950+
"close": "Luk",
951951
"customMethod": "Navn på tilpasset metode",
952952
"customMethodPlaceholder": "For eksempel session/ping",
953953
"customMethodRequired": "Udfyld venligst udvidelsesmetodens navn",
954954
"description": "Send en ACP-anmodning til \"{name}\", og se svaret i realtid.",
955955
"empty": "Der er ingen fejlretningsbegivenheder endnu.",
956-
"entry": "debug",
957-
"eventCount": "{count} varer",
956+
"entry": "Fejlsøg",
957+
"eventCount": "{count} hændelser",
958958
"eventKinds": {
959959
"error": "fejl",
960-
"notification": "underrette",
961-
"permission": "Tilladelser",
962-
"request": "spørge",
963-
"response": "svar"
960+
"notification": "Meddelelse",
961+
"permission": "Tilladelse",
962+
"request": "Anmodning",
963+
"response": "Svar"
964964
},
965-
"events": "tilfælde",
965+
"events": "Hændelser",
966966
"format": "Formater JSON",
967967
"methods": {
968968
"cancel": "session/aflys",
@@ -984,7 +984,7 @@
984984
"resetTemplate": "Gendannelsesskabelon",
985985
"send": "Send anmodning",
986986
"sending": "Sender...",
987-
"title": "ACP debugging",
987+
"title": "ACP-fejlsøgning",
988988
"workdirPlaceholder": "Lad tom for at bruge standard arbejdsmappe"
989989
}
990990
},

src/renderer/src/i18n/fa-IR/settings.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -972,20 +972,20 @@
972972
"title": "عدم وابستگی خارجی"
973973
},
974974
"debug": {
975-
"clearHistory": "رکورد پاک",
976-
"close": "بسته شدن",
975+
"clearHistory": "پاک کردن تاریخچه",
976+
"close": "بستن",
977977
"customMethod": "نام روش سفارشی",
978978
"customMethodPlaceholder": "به عنوان مثال جلسه / پینگ",
979979
"customMethodRequired": "لطفاً نام روش پسوند را وارد کنید",
980980
"description": "یک درخواست ACP به \"{name}\" ارسال کنید و پاسخ را در زمان واقعی مشاهده کنید.",
981-
"empty": "هنوز هیچ رویداد اشکال زدایی وجود ندارد.",
981+
"empty": "هنوز هیچ رویداد اشکال‌زدایی وجود ندارد.",
982982
"entry": "اشکال زدایی",
983983
"eventCount": "{count} مورد",
984984
"eventKinds": {
985985
"error": "اشتباه",
986-
"notification": "اطلاع دهد",
986+
"notification": "اعلان",
987987
"permission": "مجوزها",
988-
"request": "بپرسید",
988+
"request": "درخواست",
989989
"response": "پاسخ"
990990
},
991991
"events": "رویداد",

src/renderer/src/i18n/ko-KR/settings.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -973,7 +973,7 @@
973973
},
974974
"debug": {
975975
"clearHistory": "기록 지우기",
976-
"close": "폐쇄",
976+
"close": "닫기",
977977
"customMethod": "커스텀 메소드 이름",
978978
"customMethodPlaceholder": "예를 들어 세션/핑",
979979
"customMethodRequired": "확장 메서드 이름을 입력하세요.",
@@ -982,24 +982,24 @@
982982
"entry": "디버그",
983983
"eventCount": "{count}개 항목",
984984
"eventKinds": {
985-
"error": "실수",
986-
"notification": "통지하다",
985+
"error": "오류",
986+
"notification": "알림",
987987
"permission": "권한",
988-
"request": "묻다",
988+
"request": "요청",
989989
"response": "응답"
990990
},
991991
"events": "이벤트",
992992
"format": "JSON 형식",
993993
"methods": {
994-
"cancel": "세션/취소",
995-
"extMethod": "확장/방법",
996-
"extNotification": "내선/알림",
997-
"initialize": "초기화",
998-
"loadSession": "세션/로드",
999-
"newSession": "세션/새",
1000-
"prompt": "세션/프롬프트",
1001-
"setSessionMode": "세션/설정 모드",
1002-
"setSessionModel": "세션/세트모델"
994+
"cancel": "session/cancel",
995+
"extMethod": "ext/method",
996+
"extNotification": "ext/notification",
997+
"initialize": "initialize",
998+
"loadSession": "session/load",
999+
"newSession": "session/new",
1000+
"prompt": "session/prompt",
1001+
"setSessionMode": "session/setMode",
1002+
"setSessionModel": "session/setModel"
10031003
},
10041004
"needInitialize": "먼저 초기화를 실행해 주세요",
10051005
"parseError": "JSON 구문 분석에 실패했습니다.",
@@ -1009,7 +1009,7 @@
10091009
"requestFailed": "요청 실패",
10101010
"resetTemplate": "복구 템플릿",
10111011
"send": "요청 보내기",
1012-
"sending": "배상...",
1012+
"sending": "전송 중...",
10131013
"title": "ACP 디버깅",
10141014
"workdirPlaceholder": "기본 작업 디렉터리를 사용하려면 비워 두세요."
10151015
}

src/renderer/src/i18n/pt-BR/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -980,7 +980,7 @@
980980
"description": "Envie uma solicitação ACP para \"{name}\" e veja a resposta em tempo real.",
981981
"empty": "Ainda não há eventos de depuração.",
982982
"entry": "depurar",
983-
"eventCount": "{contar} itens",
983+
"eventCount": "{count} itens",
984984
"eventKinds": {
985985
"error": "erro",
986986
"notification": "notificar",

src/renderer/src/i18n/ru-RU/settings.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -972,23 +972,23 @@
972972
"title": "Отсутствуют внешние зависимости"
973973
},
974974
"debug": {
975-
"clearHistory": "очистить запись",
976-
"close": "закрытие",
975+
"clearHistory": "Очистить историю",
976+
"close": "Закрыть",
977977
"customMethod": "Имя пользовательского метода",
978978
"customMethodPlaceholder": "Например сеанс/пинг",
979979
"customMethodRequired": "Пожалуйста, введите имя метода расширения",
980980
"description": "Отправьте запрос ACP на «{name}» и просмотрите ответ в режиме реального времени.",
981981
"empty": "Отладочных событий пока нет.",
982-
"entry": "отлаживать",
983-
"eventCount": "{count} предметов",
982+
"entry": "Отладка",
983+
"eventCount": "{count} событий",
984984
"eventKinds": {
985985
"error": "ошибка",
986-
"notification": "уведомить",
987-
"permission": "Разрешения",
988-
"request": "просить",
989-
"response": "ответ"
986+
"notification": "Уведомление",
987+
"permission": "Разрешение",
988+
"request": "Запрос",
989+
"response": "Ответ"
990990
},
991-
"events": "событие",
991+
"events": "События",
992992
"format": "Формат JSON",
993993
"methods": {
994994
"cancel": "сеанс/отмена",
@@ -1009,7 +1009,7 @@
10091009
"requestFailed": "Запрос не выполнен",
10101010
"resetTemplate": "Шаблон восстановления",
10111011
"send": "Отправить запрос",
1012-
"sending": "Отправка...",
1012+
"sending": "Отправка",
10131013
"title": "Отладка ACP",
10141014
"workdirPlaceholder": "Оставьте пустым, чтобы использовать рабочий каталог по умолчанию."
10151015
}

0 commit comments

Comments
 (0)