From 38553de4f25ff166ea419a943ed56a7a66a82d72 Mon Sep 17 00:00:00 2001 From: simosmik Date: Thu, 30 Apr 2026 11:27:05 +0000 Subject: [PATCH] fix: coderabbit issues --- shared/modelConstants.js | 2 +- .../command-palette/sources/useSessionMessageSearch.ts | 5 ++++- src/components/sidebar/view/subcomponents/SidebarHeader.tsx | 2 +- src/contexts/PaletteOpsContext.tsx | 4 ++-- src/i18n/locales/de/sidebar.json | 3 ++- src/i18n/locales/en/sidebar.json | 3 ++- src/i18n/locales/it/sidebar.json | 3 ++- src/i18n/locales/ja/sidebar.json | 3 ++- src/i18n/locales/ko/sidebar.json | 3 ++- src/i18n/locales/ru/sidebar.json | 3 ++- src/i18n/locales/tr/sidebar.json | 3 ++- src/i18n/locales/zh-CN/sidebar.json | 3 ++- 12 files changed, 24 insertions(+), 13 deletions(-) diff --git a/shared/modelConstants.js b/shared/modelConstants.js index 06fb0166..90b973ed 100644 --- a/shared/modelConstants.js +++ b/shared/modelConstants.js @@ -51,7 +51,7 @@ export const CURSOR_MODELS = { { value: "grok", label: "Grok" }, ], - DEFAULT: "gpt-5-3-codex", + DEFAULT: "gpt-5.3-codex", }; /** diff --git a/src/components/command-palette/sources/useSessionMessageSearch.ts b/src/components/command-palette/sources/useSessionMessageSearch.ts index 7b648961..f8a399eb 100644 --- a/src/components/command-palette/sources/useSessionMessageSearch.ts +++ b/src/components/command-palette/sources/useSessionMessageSearch.ts @@ -42,8 +42,11 @@ export function useSessionMessageSearch( return; } + esRef.current?.close(); + esRef.current = null; + seqRef.current++; + const handle = setTimeout(() => { - esRef.current?.close(); const seq = ++seqRef.current; const url = api.searchConversationsUrl(trimmed); const es = new EventSource(url); diff --git a/src/components/sidebar/view/subcomponents/SidebarHeader.tsx b/src/components/sidebar/view/subcomponents/SidebarHeader.tsx index 2e0b0086..ab1eed7e 100644 --- a/src/components/sidebar/view/subcomponents/SidebarHeader.tsx +++ b/src/components/sidebar/view/subcomponents/SidebarHeader.tsx @@ -164,7 +164,7 @@ export default function SidebarHeader({ ) : ( {MOD_KEY} diff --git a/src/contexts/PaletteOpsContext.tsx b/src/contexts/PaletteOpsContext.tsx index 0d50fbc8..c0281780 100644 --- a/src/contexts/PaletteOpsContext.tsx +++ b/src/contexts/PaletteOpsContext.tsx @@ -1,5 +1,5 @@ import { createContext, useContext, useEffect, useMemo, useRef } from 'react'; -import type { ReactNode } from 'react'; +import type { MutableRefObject, ReactNode } from 'react'; export type PaletteOps = { openFile: (path: string) => void; @@ -7,7 +7,7 @@ export type PaletteOps = { refreshProjects: () => Promise | void; }; -type Registry = React.MutableRefObject>; +type Registry = MutableRefObject>; const PaletteOpsContext = createContext(null); diff --git a/src/i18n/locales/de/sidebar.json b/src/i18n/locales/de/sidebar.json index b2df5190..ecc489ea 100644 --- a/src/i18n/locales/de/sidebar.json +++ b/src/i18n/locales/de/sidebar.json @@ -47,7 +47,8 @@ "deleteSession": "Diese Sitzung dauerhaft löschen", "save": "Speichern", "cancel": "Abbrechen", - "clearSearch": "Suche leeren" + "clearSearch": "Suche leeren", + "openCommandPalette": "Befehlspalette öffnen" }, "navigation": { "chat": "Chat", diff --git a/src/i18n/locales/en/sidebar.json b/src/i18n/locales/en/sidebar.json index 7b3452cb..43498ce7 100644 --- a/src/i18n/locales/en/sidebar.json +++ b/src/i18n/locales/en/sidebar.json @@ -47,7 +47,8 @@ "deleteSession": "Delete this session permanently", "save": "Save", "cancel": "Cancel", - "clearSearch": "Clear search" + "clearSearch": "Clear search", + "openCommandPalette": "Open command palette" }, "navigation": { "chat": "Chat", diff --git a/src/i18n/locales/it/sidebar.json b/src/i18n/locales/it/sidebar.json index 79a71bad..986e5fd1 100644 --- a/src/i18n/locales/it/sidebar.json +++ b/src/i18n/locales/it/sidebar.json @@ -47,7 +47,8 @@ "deleteSession": "Elimina questa sessione permanentemente", "save": "Salva", "cancel": "Annulla", - "clearSearch": "Cancella ricerca" + "clearSearch": "Cancella ricerca", + "openCommandPalette": "Apri tavolozza comandi" }, "navigation": { "chat": "Chat", diff --git a/src/i18n/locales/ja/sidebar.json b/src/i18n/locales/ja/sidebar.json index 33c17399..98861878 100644 --- a/src/i18n/locales/ja/sidebar.json +++ b/src/i18n/locales/ja/sidebar.json @@ -46,7 +46,8 @@ "editSessionName": "セッション名を手動で編集", "deleteSession": "このセッションを完全に削除", "save": "保存", - "cancel": "キャンセル" + "cancel": "キャンセル", + "openCommandPalette": "コマンドパレットを開く" }, "navigation": { "chat": "チャット", diff --git a/src/i18n/locales/ko/sidebar.json b/src/i18n/locales/ko/sidebar.json index d7fcafaa..cd7e0289 100644 --- a/src/i18n/locales/ko/sidebar.json +++ b/src/i18n/locales/ko/sidebar.json @@ -46,7 +46,8 @@ "editSessionName": "세션 이름 직접 편집", "deleteSession": "이 세션 영구 삭제", "save": "저장", - "cancel": "취소" + "cancel": "취소", + "openCommandPalette": "명령 팔레트 열기" }, "navigation": { "chat": "채팅", diff --git a/src/i18n/locales/ru/sidebar.json b/src/i18n/locales/ru/sidebar.json index 9af33d54..fee429b1 100644 --- a/src/i18n/locales/ru/sidebar.json +++ b/src/i18n/locales/ru/sidebar.json @@ -47,7 +47,8 @@ "deleteSession": "Удалить этот сеанс навсегда", "save": "Сохранить", "cancel": "Отмена", - "clearSearch": "Очистить поиск" + "clearSearch": "Очистить поиск", + "openCommandPalette": "Открыть палитру команд" }, "navigation": { "chat": "Чат", diff --git a/src/i18n/locales/tr/sidebar.json b/src/i18n/locales/tr/sidebar.json index b0ba4ad7..0640fca5 100644 --- a/src/i18n/locales/tr/sidebar.json +++ b/src/i18n/locales/tr/sidebar.json @@ -47,7 +47,8 @@ "deleteSession": "Bu oturumu kalıcı olarak sil", "save": "Kaydet", "cancel": "İptal", - "clearSearch": "Aramayı temizle" + "clearSearch": "Aramayı temizle", + "openCommandPalette": "Komut paletini aç" }, "navigation": { "chat": "Sohbet", diff --git a/src/i18n/locales/zh-CN/sidebar.json b/src/i18n/locales/zh-CN/sidebar.json index 85053d92..9de4ea83 100644 --- a/src/i18n/locales/zh-CN/sidebar.json +++ b/src/i18n/locales/zh-CN/sidebar.json @@ -47,7 +47,8 @@ "deleteSession": "永久删除此会话", "save": "保存", "cancel": "取消", - "clearSearch": "清除搜索" + "clearSearch": "清除搜索", + "openCommandPalette": "打开命令面板" }, "navigation": { "chat": "聊天",