diff --git a/README.md b/README.md index 281f05c..1dd8cea 100644 --- a/README.md +++ b/README.md @@ -141,7 +141,7 @@ Open **Settings → Qoderian**: | Group | Contents | |-------|----------| | **Setup** | Qoder CLI edition and path to the `qodercli` executable (auto-detected by default) | -| **Display** | Chat view placement, maximum tabs, auto-scroll, deferred math rendering during streaming, and default expansion of file edits (the language selector sits above this group) | +| **Display** | Chat view placement, auto-scroll, deferred math rendering during streaming, and default expansion of file edits (the language selector sits above this group) | | **Conversations** | Auto-generated titles and the model that writes them | | **Content** | User name, custom system prompt, excluded tags, media folder | | **Input** | Send-key behavior and vim-style navigation mappings | diff --git a/README.zh-CN.md b/README.zh-CN.md index 713048d..0bf1d68 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -139,7 +139,7 @@ QODER_CLI_PATH=/absolute/path/to/qodercli npm run smoke:qoder | 分组 | 内容 | |-------|----------| | **设置** | Qoder CLI 版本与 `qodercli` 可执行文件路径(默认自动探测) | -| **显示** | Qoderian 打开位置、最大聊天标签数、流式传输时自动滚动、流式传输时延迟渲染数学公式、默认展开文件编辑(语言选择器在该组上方) | +| **显示** | Qoderian 打开位置、流式传输时自动滚动、流式传输时延迟渲染数学公式、默认展开文件编辑(语言选择器在该组上方) | | **对话** | 自动生成对话标题与标题生成模型 | | **内容** | 用户名、自定义系统提示词、排除的标签、媒体文件夹 | | **输入** | 需要 Command/Ctrl+Enter 发送与 Vim 风格导航映射 | diff --git a/package-lock.json b/package-lock.json index de919b4..c51c09e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1551,9 +1551,9 @@ } }, "node_modules/@hono/node-server": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@hono/node-server/-/node-server-2.1.5.tgz", - "integrity": "sha512-MgP/I06GdvsilDspMk/qmRzpk8LOUStP6jFAbSRi40W09DhoyUn+Mj7eyKICPqeYKybOjVFLVIAQzvu1bfIa7Q==", + "version": "2.1.11", + "resolved": "https://registry.npmjs.org/@hono/node-server/-/node-server-2.1.11.tgz", + "integrity": "sha512-KzKz9vl4vvr1vgLHamj+g5uonbrj5NwAdO3yzOS6cd2HjALVeOgTgeZOyAzNxejbkfOOPIcvuf/Tg8l1pEFLog==", "license": "MIT", "engines": { "node": ">=20" @@ -7027,9 +7027,9 @@ } }, "node_modules/hono": { - "version": "4.13.14", - "resolved": "https://registry.npmjs.org/hono/-/hono-4.13.14.tgz", - "integrity": "sha512-yhRLQ21U6qa9Hsu2N7Qcbh8tE+WKEcoErjIo56LeSGiGXGp9sA7UpE86Ui9uexb61KakiGwuHMn2QdV7w6i6kQ==", + "version": "4.13.22", + "resolved": "https://registry.npmjs.org/hono/-/hono-4.13.22.tgz", + "integrity": "sha512-wncKd5/40Pj8grx0RZ2fgNIicFEmVFwIHT5UFLTnphR8I6AQWFf9c2JoM6ZJ9g8y4pMzg3sNlCVNe0m2Yclg0Q==", "license": "MIT", "engines": { "node": ">=16.9.0" diff --git a/package.json b/package.json index 8357ae8..3f20674 100644 --- a/package.json +++ b/package.json @@ -61,14 +61,14 @@ }, "overrides": { "@babel/core": "7.29.7", - "@hono/node-server": "2.1.5", + "@hono/node-server": "2.1.11", "body-parser": "2.4.0", "brace-expansion": "5.0.9", "esbuild": "$esbuild", "express": "5.3.0", "express-rate-limit": "8.7.2", "fast-uri": "^3.1.9", - "hono": "4.13.14", + "hono": "4.13.22", "ip-address": "10.7.5", "js-yaml": "4.3.0", "minimatch": "10.2.5", diff --git a/src/app/settings/settings-storage.ts b/src/app/settings/settings-storage.ts index b713cb9..72ed4b2 100644 --- a/src/app/settings/settings-storage.ts +++ b/src/app/settings/settings-storage.ts @@ -42,7 +42,6 @@ export const DEFAULT_QODERIAN_SETTINGS: QoderianSettings = { qoder: { ...DEFAULT_QODER_SETTINGS }, - maxTabs: 3, enableAutoScroll: true, deferMathRenderingDuringStreaming: true, expandFileEditsByDefault: false, @@ -155,6 +154,7 @@ export class QoderianSettingsStorage { envSnippets: _removedEnvironmentSnippets, customModelAliases: _removedModelAliases, hiddenCommands: _removedHiddenCommands, + maxTabs: _removedMaxTabs, ...storedWithoutRemovedSettings } = stored; const merged = { diff --git a/src/core/types/settings.ts b/src/core/types/settings.ts index 388e3a4..1f2afc8 100644 --- a/src/core/types/settings.ts +++ b/src/core/types/settings.ts @@ -188,7 +188,6 @@ export interface QoderianSettings { qoder: QoderSettings; // UI preferences - maxTabs: number; enableAutoScroll: boolean; deferMathRenderingDuringStreaming: boolean; expandFileEditsByDefault: boolean; diff --git a/src/features/chat/chat-view.ts b/src/features/chat/chat-view.ts index 2bf0e5b..0a37838 100644 --- a/src/features/chat/chat-view.ts +++ b/src/features/chat/chat-view.ts @@ -22,7 +22,7 @@ import { } from './tabs/tab'; import { TabBar } from './tabs/tab-bar'; import { TabManager } from './tabs/tab-manager'; -import { DEFAULT_MAX_TABS, type TabData, type TabId } from './tabs/types'; +import { type TabData, type TabId } from './tabs/types'; import { CreditsUsageButton } from './ui/credits-usage-button'; type LoadableView = { @@ -411,11 +411,6 @@ export class QoderianView extends ItemView { return this.sessionTabsRedesignEnabled() ? t('nav.newSession') : t('commands.newTab'); } - /** Refreshes tab controls after settings that affect tab availability change. */ - refreshTabControls(): void { - this.updateTabBarVisibility(); - } - /** Re-renders tab chrome after the experimental session-tab mode changes. */ refreshSessionTabsMode(): void { this.newConversationButtonEl?.toggleClass( @@ -470,12 +465,7 @@ export class QoderianView extends ItemView { } async createNewTab(): Promise { - const tab = await this.tabManager?.createTab(); - if (!tab) { - this.noticeSessionLimit(); - this.updateTabBarVisibility(); - return; - } + await this.tabManager?.createTab(); this.updateTabBarVisibility(); } @@ -506,24 +496,6 @@ export class QoderianView extends ItemView { const showTabBar = tabCount >= 2; this.tabBarContainerEl.toggleClass('qoderian-hidden', !showTabBar); - - this.updateNewTabButtonVisibility(); - } - - private updateNewTabButtonVisibility(): void { - if (!this.newTabButtonEl || !this.tabManager) return; - if (this.sessionTabsRedesignEnabled()) return; - - const canCreateTab = this.tabManager.canCreateTab(); - this.newTabButtonEl.toggleClass('qoderian-hidden', !canCreateTab); - if (canCreateTab) { - this.newTabButtonEl.removeAttribute('aria-disabled'); - this.newTabButtonEl.removeAttribute('aria-hidden'); - return; - } - - this.newTabButtonEl.setAttribute('aria-disabled', 'true'); - this.newTabButtonEl.setAttribute('aria-hidden', 'true'); } /** Ensures the fixed Qoder logo is mounted in the header. */ @@ -576,12 +548,9 @@ export class QoderianView extends ItemView { private async openHistoryConversation(conversationId: string): Promise { // With the redesigned tabs, resuming a conversation must not replace the // session in the active tab; legacy keeps opening it in the current tab. - const opened = await this.tabManager?.openConversation(conversationId, { + await this.tabManager?.openConversation(conversationId, { preferNewTab: this.sessionTabsRedesignEnabled(), }); - if (opened === false) { - this.noticeSessionLimit(); - } this.historyDropdown?.removeClass('visible'); } @@ -589,21 +558,13 @@ export class QoderianView extends ItemView { conversationId: string, activate = true, ): Promise { - const opened = await this.tabManager?.openConversation(conversationId, { + await this.tabManager?.openConversation(conversationId, { preferNewTab: true, activate, }); - if (opened === false) { - this.noticeSessionLimit(); - } this.historyDropdown?.removeClass('visible'); } - private noticeSessionLimit(): void { - const maxTabs = this.plugin.settings.maxTabs ?? DEFAULT_MAX_TABS; - new Notice(t('chat.tabs.maxTabsReached', { count: String(maxTabs) })); - } - private getHistoryConversationStatus(conversationId: string): HistoryConversationStatus { const activeTab = this.tabManager?.getActiveTab(); if (activeTab?.conversationId === conversationId) { diff --git a/src/features/chat/tabs/tab-manager.ts b/src/features/chat/tabs/tab-manager.ts index 3840c4e..0def770 100644 --- a/src/features/chat/tabs/tab-manager.ts +++ b/src/features/chat/tabs/tab-manager.ts @@ -18,9 +18,6 @@ import { wireTabInputEvents, } from './tab'; import { - DEFAULT_MAX_TABS, - MAX_TABS, - MIN_TABS, type PersistedTabManagerState, type PersistedTabState, type TabBarItem, @@ -57,15 +54,6 @@ export class TabManager implements TabManagerInterface { /** Guard to prevent concurrent tab switches. */ private isSwitchingTab = false; - /** - * Gets the current max tabs limit from settings. - * Clamps to MIN_TABS and MAX_TABS bounds. - */ - private getMaxTabs(): number { - const settingsValue = this.plugin.settings.maxTabs ?? DEFAULT_MAX_TABS; - return Math.max(MIN_TABS, Math.min(MAX_TABS, settingsValue)); - } - /** Whether the experimental session-tab interaction (own tab per session) is on. */ private sessionTabsRedesignEnabled(): boolean { return this.plugin.settings.enableSessionTabsRedesign === true; @@ -92,13 +80,12 @@ export class TabManager implements TabManagerInterface { * @param conversationId Optional conversation to load into the tab. * @param tabId Optional tab ID (for restoration). * @param options Controls whether the new tab becomes active immediately. - * @returns The created tab, or null if max tabs reached. */ async createTab( conversationId?: string | null, tabId?: TabId, options: CreateTabOptions = {}, - ): Promise { + ): Promise { return this.createTabInner(conversationId, tabId, options); } @@ -106,12 +93,7 @@ export class TabManager implements TabManagerInterface { conversationId?: string | null, tabId?: TabId, options: CreateTabOptions = {}, - ): Promise { - const maxTabs = this.getMaxTabs(); - if (this.tabs.size >= maxTabs) { - return null; - } - + ): Promise { const { activate = true, draftModel } = options; const conversation = conversationId @@ -150,7 +132,7 @@ export class TabManager implements TabManagerInterface { this.plugin, this.view, (forkContext) => this.handleForkRequest(forkContext), - (conversationId) => this.openConversation(conversationId).then(() => undefined), + (conversationId) => this.openConversation(conversationId), () => this.getQoderCatalogConfig(tab), ); @@ -320,11 +302,6 @@ export class TabManager implements TabManagerInterface { return this.tabs.size; } - /** Checks if more tabs can be created. */ - canCreateTab(): boolean { - return this.tabs.size < this.getMaxTabs(); - } - // ============================================ // Tab Bar Data // ============================================ @@ -361,12 +338,11 @@ export class TabManager implements TabManagerInterface { * Opens a conversation in a new tab or existing tab. * @param conversationId The conversation to open. * @param options Controls tab creation behavior (backward-compatible with boolean). - * @returns False when a new tab was requested but the tab limit is reached. */ async openConversation( conversationId: string, options: boolean | OpenConversationOptions = false, - ): Promise { + ): Promise { const preferNewTab = typeof options === 'boolean' ? options : options.preferNewTab ?? false; @@ -378,7 +354,7 @@ export class TabManager implements TabManagerInterface { for (const tab of this.tabs.values()) { if (tab.conversationId === conversationId) { await this.switchToTab(tab.id); - return true; + return; } } @@ -390,19 +366,12 @@ export class TabManager implements TabManagerInterface { // Focus the other view and switch to its tab instead of opening duplicate await revealWorkspaceLeaf(this.plugin.app.workspace, crossViewResult.view.leaf); await crossViewResult.view.getTabManager()?.switchToTab(crossViewResult.tabId); - return true; + return; } - // Open in a new tab when requested. The redesigned tabs never replace the - // active tab silently; the legacy behavior keeps the old fallback. if (preferNewTab) { - if (this.canCreateTab()) { - await this.createTab(conversationId, undefined, { activate }); - return true; - } - if (this.sessionTabsRedesignEnabled()) { - return false; - } + await this.createTab(conversationId, undefined, { activate }); + return; } // Open in current tab @@ -413,7 +382,6 @@ export class TabManager implements TabManagerInterface { if (activeTab) { await activeTab.controllers.conversationController?.switchTo(conversationId); } - return true; } /** @@ -444,12 +412,7 @@ export class TabManager implements TabManagerInterface { if (!target) return; if (target === 'new-tab') { - const tab = await this.forkToNewTab(context); - if (!tab) { - const maxTabs = this.getMaxTabs(); - new Notice(t('chat.fork.maxTabsReached', { count: String(maxTabs) })); - return; - } + await this.forkToNewTab(context); new Notice(t('chat.fork.notice')); } else { const success = await this.forkInCurrentTab(context); @@ -461,12 +424,7 @@ export class TabManager implements TabManagerInterface { } } - async forkToNewTab(context: ForkContext): Promise { - const maxTabs = this.getMaxTabs(); - if (this.tabs.size >= maxTabs) { - return null; - } - + async forkToNewTab(context: ForkContext): Promise { const conversationId = await this.createForkConversation(context); try { return await this.createTab(conversationId); diff --git a/src/features/chat/tabs/types.ts b/src/features/chat/tabs/types.ts index cbbfc48..95f802e 100644 --- a/src/features/chat/tabs/types.ts +++ b/src/features/chat/tabs/types.ts @@ -32,27 +32,6 @@ import type { NavigationSidebar } from '../ui/navigation-sidebar'; import type { StatusPanel } from '../ui/status-panel'; import type { VaultDropController } from '../ui/vault-drop'; -/** - * Default number of tabs allowed. - * - * Set to 3 to balance usability with resource usage: - * - Each tab has its own chat runtime and persistent query - * - More tabs = more memory and potential SDK processes - * - 3 tabs allows multi-tasking without excessive overhead - */ -export const DEFAULT_MAX_TABS = 3; - -/** - * Minimum number of tabs allowed (settings floor). - */ -export const MIN_TABS = 3; - -/** - * Maximum number of tabs allowed (settings ceiling). - * Users can configure up to this many tabs via settings. - */ -export const MAX_TABS = 10; - /** * Minimal interface for the QoderianView methods used by TabManager and Tab. * Extends Component for Obsidian integration (event handling, cleanup). diff --git a/src/features/settings/settings-tab.ts b/src/features/settings/settings-tab.ts index 72a925c..033f7ae 100644 --- a/src/features/settings/settings-tab.ts +++ b/src/features/settings/settings-tab.ts @@ -108,17 +108,6 @@ export class QoderianSettingTab extends PluginSettingTab { type: 'group', heading: t('settings.display'), items: [ - { - name: t('settings.maxTabs.name'), - desc: t('settings.maxTabs.desc'), - render: (setting, group) => { - let injected: HTMLElement | null = null; - this.deferIntoList(group, (host) => { - injected = this.renderMaxTabsControl(setting, host); - }); - return () => { injected?.remove(); }; - }, - }, { name: t('settings.chatViewPlacement.name'), desc: t('settings.chatViewPlacement.desc'), @@ -473,10 +462,6 @@ export class QoderianSettingTab extends PluginSettingTab { this.update(); this.refreshLocalizedLanguageRow(previousName, previousDesc); this.refreshViewChrome(); - } else if (key === 'maxTabs') { - for (const view of this.plugin.getAllViews()) { - view.refreshTabControls(); - } } else if (key === 'enableSessionTabsRedesign') { for (const view of this.plugin.getAllViews()) { view.refreshSessionTabsMode(); @@ -616,11 +601,6 @@ export class QoderianSettingTab extends PluginSettingTab { new Setting(container).setName(t('settings.display')).setHeading(); - const maxTabsSetting = new Setting(container) - .setName(t('settings.maxTabs.name')) - .setDesc(t('settings.maxTabs.desc')); - this.renderMaxTabsControl(maxTabsSetting, container); - const placementSetting = new Setting(container) .setName(t('settings.chatViewPlacement.name')) .setDesc(t('settings.chatViewPlacement.desc')); @@ -777,35 +757,6 @@ export class QoderianSettingTab extends PluginSettingTab { this.renderNavMappingsControl(navMappingsSetting); } - /** Builds the max tabs slider with its over-limit warning. */ - private renderMaxTabsControl(setting: Setting, warningHost: HTMLElement): HTMLElement { - const maxTabsWarningEl = warningHost.createDiv({ - cls: 'qoderian-max-tabs-warning qoderian-setting-validation qoderian-setting-validation-warning qoderian-hidden', - }); - maxTabsWarningEl.setText(t('settings.maxTabs.warning')); - - const updateMaxTabsWarning = (value: number): void => { - maxTabsWarningEl.toggleClass('qoderian-hidden', value <= 5); - }; - - setting.addSlider((slider) => { - slider - .setLimits(3, 10, 1) - .setValue(this.plugin.settings.maxTabs ?? 3) - .onChange(async (value) => { - this.plugin.settings.maxTabs = value; - await this.plugin.saveSettings(); - updateMaxTabsWarning(value); - for (const view of this.plugin.getAllViews()) { - view.refreshTabControls(); - } - }); - updateMaxTabsWarning(this.plugin.settings.maxTabs ?? 3); - }); - - return maxTabsWarningEl; - } - /** Builds the chat view placement dropdown with error rollback. */ private renderChatViewPlacementControl(setting: Setting): void { setting.addDropdown((dropdown) => { diff --git a/src/i18n/locales/de.json b/src/i18n/locales/de.json index aa8a22c..76ec2d6 100644 --- a/src/i18n/locales/de.json +++ b/src/i18n/locales/de.json @@ -94,7 +94,6 @@ "chooseTarget": "Konversation verzweigen", "targetNewTab": "Neuer Tab", "targetCurrentTab": "Aktueller Tab", - "maxTabsReached": "Verzweigung nicht möglich: maximal {count} Tabs erreicht", "notice": "In neuem Tab verzweigt", "noticeCurrentTab": "Im aktuellen Tab verzweigt", "failed": "Verzweigung fehlgeschlagen: {error}", @@ -107,9 +106,6 @@ "commandNoMessages": "Verzweigung nicht möglich: keine Nachrichten in der Konversation", "commandNoAssistantUuid": "Verzweigung nicht möglich: keine Assistentenantwort mit Kennungen" }, - "tabs": { - "maxTabsReached": "Sitzungslimit erreicht ({count}). Du kannst das Limit in den Einstellungen ändern." - }, "bangBash": { "placeholder": "> Einen Bash-Befehl ausführen...", "commandPanel": "Befehlspanel", @@ -352,11 +348,6 @@ "noNode": "Node.js wurde auf PATH nicht gefunden. Installiere Node.js oder prüfe deine PATH-Konfiguration." } }, - "maxTabs": { - "name": "Maximale Chat-Tabs", - "desc": "Maximale Anzahl gleichzeitiger Chat-Tabs (3-10). Jeder Tab verwendet eine separate Qoder-Sitzung.", - "warning": "Mehr als 5 Tabs können Leistung und Speichernutzung beeinträchtigen." - }, "enableAutoScroll": { "name": "Automatisches Scrollen während Streaming", "desc": "Automatisch nach unten scrollen, während Qoder Antworten streamt. Deaktivieren, um oben zu bleiben und von Anfang an zu lesen." diff --git a/src/i18n/locales/en.json b/src/i18n/locales/en.json index 2a18578..bfa93b8 100644 --- a/src/i18n/locales/en.json +++ b/src/i18n/locales/en.json @@ -94,7 +94,6 @@ "chooseTarget": "Fork conversation", "targetNewTab": "New tab", "targetCurrentTab": "Current tab", - "maxTabsReached": "Cannot fork: maximum {count} tabs reached", "notice": "Forked to new tab", "noticeCurrentTab": "Forked in current tab", "failed": "Fork failed: {error}", @@ -107,9 +106,6 @@ "commandNoMessages": "Cannot fork: no messages in conversation", "commandNoAssistantUuid": "Cannot fork: no assistant response with identifiers" }, - "tabs": { - "maxTabsReached": "Session limit reached ({count}). You can change the limit in Settings." - }, "bangBash": { "placeholder": "> Run a bash command...", "commandPanel": "Command panel", @@ -352,11 +348,6 @@ "noNode": "Node.js not found on PATH. Install Node.js or check your PATH configuration." } }, - "maxTabs": { - "name": "Maximum chat tabs", - "desc": "Maximum number of concurrent chat tabs (3-10). Each tab uses a separate Qoder session.", - "warning": "More than 5 tabs may impact performance and memory usage." - }, "enableAutoScroll": { "name": "Auto-scroll during streaming", "desc": "Automatically scroll to the bottom as Qoder streams responses. Disable to stay at the top and read from the beginning." diff --git a/src/i18n/locales/es.json b/src/i18n/locales/es.json index 972738c..dabf15d 100644 --- a/src/i18n/locales/es.json +++ b/src/i18n/locales/es.json @@ -94,7 +94,6 @@ "chooseTarget": "Bifurcar conversación", "targetNewTab": "Nueva pestaña", "targetCurrentTab": "Pestaña actual", - "maxTabsReached": "No se puede bifurcar: máximo de {count} pestañas alcanzado", "notice": "Bifurcado a nueva pestaña", "noticeCurrentTab": "Bifurcado en pestaña actual", "failed": "Error al bifurcar: {error}", @@ -107,9 +106,6 @@ "commandNoMessages": "No se puede bifurcar: no hay mensajes en la conversación", "commandNoAssistantUuid": "No se puede bifurcar: no hay respuesta del asistente con identificadores" }, - "tabs": { - "maxTabsReached": "Límite de sesiones alcanzado ({count}). Puedes cambiar el límite en Ajustes." - }, "bangBash": { "placeholder": "> Ejecuta un comando bash...", "commandPanel": "Panel de comandos", @@ -352,11 +348,6 @@ "noNode": "Node.js no se encontró en PATH. Instala Node.js o revisa tu configuración de PATH." } }, - "maxTabs": { - "name": "Máximo de pestañas de chat", - "desc": "Número máximo de pestañas de chat simultáneas (3-10). Cada pestaña usa una sesión de Qoder separada.", - "warning": "Más de 5 pestañas puede afectar el rendimiento y el uso de memoria." - }, "enableAutoScroll": { "name": "Desplazamiento automático durante streaming", "desc": "Desplazarse automáticamente hacia abajo mientras Qoder transmite respuestas. Desactivar para quedarse arriba y leer desde el principio." diff --git a/src/i18n/locales/fr.json b/src/i18n/locales/fr.json index 68b996d..b621e77 100644 --- a/src/i18n/locales/fr.json +++ b/src/i18n/locales/fr.json @@ -94,7 +94,6 @@ "chooseTarget": "Bifurquer la conversation", "targetNewTab": "Nouvel onglet", "targetCurrentTab": "Onglet actuel", - "maxTabsReached": "Impossible de bifurquer : maximum de {count} onglets atteint", "notice": "Bifurqué dans un nouvel onglet", "noticeCurrentTab": "Bifurqué dans l'onglet actuel", "failed": "Échec de la bifurcation : {error}", @@ -107,9 +106,6 @@ "commandNoMessages": "Impossible de bifurquer : aucun message dans la conversation", "commandNoAssistantUuid": "Impossible de bifurquer : aucune réponse de l’assistant avec des identifiants" }, - "tabs": { - "maxTabsReached": "Limite de sessions atteinte ({count}). Vous pouvez modifier la limite dans les paramètres." - }, "bangBash": { "placeholder": "> Exécuter une commande bash...", "commandPanel": "Panneau de commandes", @@ -352,11 +348,6 @@ "noNode": "Node.js introuvable dans PATH. Installez Node.js ou vérifiez votre configuration PATH." } }, - "maxTabs": { - "name": "Maximum d'onglets de chat", - "desc": "Nombre maximum d'onglets de chat simultanés (3-10). Chaque onglet utilise une session Qoder séparée.", - "warning": "Plus de 5 onglets peut affecter les performances et l'utilisation de la mémoire." - }, "enableAutoScroll": { "name": "Défilement automatique pendant le streaming", "desc": "Défiler automatiquement vers le bas pendant que Qoder diffuse les réponses. Désactiver pour rester en haut et lire depuis le début." diff --git a/src/i18n/locales/ja.json b/src/i18n/locales/ja.json index f68151f..73b5c2a 100644 --- a/src/i18n/locales/ja.json +++ b/src/i18n/locales/ja.json @@ -94,7 +94,6 @@ "chooseTarget": "会話を分岐", "targetNewTab": "新しいタブ", "targetCurrentTab": "現在のタブ", - "maxTabsReached": "分岐できません:最大 {count} タブに達しました", "notice": "新しいタブに分岐しました", "noticeCurrentTab": "現在のタブで分岐しました", "failed": "分岐に失敗:{error}", @@ -107,9 +106,6 @@ "commandNoMessages": "フォークできません: 会話にメッセージがありません", "commandNoAssistantUuid": "フォークできません: 識別子付きのアシスタント応答がありません" }, - "tabs": { - "maxTabsReached": "セッションの上限({count})に達しました。設定で上限を変更できます。" - }, "bangBash": { "placeholder": "> bash コマンドを実行...", "commandPanel": "コマンドパネル", @@ -352,11 +348,6 @@ "noNode": "PATH に Node.js が見つかりません。Node.js をインストールするか、PATH 設定を確認してください。" } }, - "maxTabs": { - "name": "最大チャットタブ数", - "desc": "同時に開ける最大チャットタブ数(3-10)。各タブは個別の Qoder セッションを使用します。", - "warning": "5 タブを超えるとパフォーマンスやメモリ使用量に影響する可能性があります。" - }, "enableAutoScroll": { "name": "ストリーミング中の自動スクロール", "desc": "Qoderが応答をストリーミングしている間、自動的に下にスクロールします。無効にすると上部に留まり、最初から読むことができます。" diff --git a/src/i18n/locales/ko.json b/src/i18n/locales/ko.json index b8e1ff3..01b5800 100644 --- a/src/i18n/locales/ko.json +++ b/src/i18n/locales/ko.json @@ -94,7 +94,6 @@ "chooseTarget": "대화 분기", "targetNewTab": "새 탭", "targetCurrentTab": "현재 탭", - "maxTabsReached": "분기 불가: 최대 {count}개 탭에 도달했습니다", "notice": "새 탭으로 분기됨", "noticeCurrentTab": "현재 탭에서 분기됨", "failed": "분기 실패: {error}", @@ -107,9 +106,6 @@ "commandNoMessages": "포크할 수 없습니다: 대화에 메시지가 없습니다", "commandNoAssistantUuid": "포크할 수 없습니다: 식별자가 있는 어시스턴트 응답이 없습니다" }, - "tabs": { - "maxTabsReached": "세션 한도({count})에 도달했습니다. 설정에서 한도를 변경할 수 있습니다." - }, "bangBash": { "placeholder": "> bash 명령 실행...", "commandPanel": "명령 패널", @@ -352,11 +348,6 @@ "noNode": "PATH에서 Node.js를 찾을 수 없습니다. Node.js를 설치하거나 PATH 설정을 확인하세요." } }, - "maxTabs": { - "name": "최대 채팅 탭 수", - "desc": "동시에 열 수 있는 최대 채팅 탭 수(3-10). 각 탭은 별도의 Qoder 세션을 사용합니다.", - "warning": "5개 탭을 초과하면 성능 및 메모리 사용량에 영향을 줄 수 있습니다." - }, "enableAutoScroll": { "name": "스트리밍 중 자동 스크롤", "desc": "Qoder가 응답을 스트리밍하는 동안 자동으로 아래로 스크롤합니다. 비활성화하면 상단에 머물러 처음부터 읽을 수 있습니다." diff --git a/src/i18n/locales/pt.json b/src/i18n/locales/pt.json index 82f075f..4339070 100644 --- a/src/i18n/locales/pt.json +++ b/src/i18n/locales/pt.json @@ -94,7 +94,6 @@ "chooseTarget": "Bifurcar conversa", "targetNewTab": "Nova aba", "targetCurrentTab": "Aba atual", - "maxTabsReached": "Não é possível bifurcar: máximo de {count} abas atingido", "notice": "Bifurcado para nova aba", "noticeCurrentTab": "Bifurcado na aba atual", "failed": "Falha ao bifurcar: {error}", @@ -107,9 +106,6 @@ "commandNoMessages": "Não é possível bifurcar: não há mensagens na conversa", "commandNoAssistantUuid": "Não é possível bifurcar: não há resposta do assistente com identificadores" }, - "tabs": { - "maxTabsReached": "Limite de sessões atingido ({count}). Você pode alterar o limite nas configurações." - }, "bangBash": { "placeholder": "> Executar um comando bash...", "commandPanel": "Painel de comandos", @@ -352,11 +348,6 @@ "noNode": "Node.js não encontrado no PATH. Instale o Node.js ou verifique a configuração do PATH." } }, - "maxTabs": { - "name": "Máximo de abas de chat", - "desc": "Número máximo de abas de chat simultâneas (3-10). Cada aba usa uma sessão Qoder separada.", - "warning": "Mais de 5 abas pode afetar o desempenho e o uso de memória." - }, "enableAutoScroll": { "name": "Rolagem automática durante streaming", "desc": "Rolar automaticamente para baixo enquanto o Qoder transmite respostas. Desativar para ficar no topo e ler desde o início." diff --git a/src/i18n/locales/ru.json b/src/i18n/locales/ru.json index d088e40..a3c8f47 100644 --- a/src/i18n/locales/ru.json +++ b/src/i18n/locales/ru.json @@ -94,7 +94,6 @@ "chooseTarget": "Ответвить разговор", "targetNewTab": "Новая вкладка", "targetCurrentTab": "Текущая вкладка", - "maxTabsReached": "Невозможно ответвить: достигнут максимум {count} вкладок", "notice": "Ответвлено в новую вкладку", "noticeCurrentTab": "Ответвлено в текущей вкладке", "failed": "Ошибка ответвления: {error}", @@ -107,9 +106,6 @@ "commandNoMessages": "Нельзя форкнуть: в диалоге нет сообщений", "commandNoAssistantUuid": "Нельзя форкнуть: нет ответа ассистента с идентификаторами" }, - "tabs": { - "maxTabsReached": "Достигнут предел сессий ({count}). Изменить предел можно в настройках." - }, "bangBash": { "placeholder": "> Выполнить команду bash...", "commandPanel": "Панель команд", @@ -352,11 +348,6 @@ "noNode": "Node.js не найден в PATH. Установите Node.js или проверьте настройку PATH." } }, - "maxTabs": { - "name": "Максимум вкладок чата", - "desc": "Максимальное количество одновременных вкладок чата (3-10). Каждая вкладка использует отдельную сессию Qoder.", - "warning": "Более 5 вкладок может повлиять на производительность и использование памяти." - }, "enableAutoScroll": { "name": "Автопрокрутка во время потоковой передачи", "desc": "Автоматически прокручивать вниз, пока Qoder передает ответы. Отключите, чтобы оставаться наверху и читать с начала." diff --git a/src/i18n/locales/zh-CN.json b/src/i18n/locales/zh-CN.json index ff84d1f..70f9556 100644 --- a/src/i18n/locales/zh-CN.json +++ b/src/i18n/locales/zh-CN.json @@ -94,7 +94,6 @@ "chooseTarget": "分叉对话", "targetNewTab": "新标签页", "targetCurrentTab": "当前标签页", - "maxTabsReached": "无法分叉:已达到最大 {count} 个标签页", "notice": "已分叉到新标签页", "noticeCurrentTab": "已在当前标签页分叉", "failed": "分叉失败:{error}", @@ -107,9 +106,6 @@ "commandNoMessages": "无法分叉:对话中没有消息", "commandNoAssistantUuid": "无法分叉:没有带标识符的助手回复" }, - "tabs": { - "maxTabsReached": "已达会话上限({count}),可在设置中调整上限。" - }, "bangBash": { "placeholder": "> 运行命令...", "commandPanel": "命令面板", @@ -352,11 +348,6 @@ "noNode": "未在 PATH 中找到 Node.js。请安装 Node.js 或检查 PATH 配置。" } }, - "maxTabs": { - "name": "最大聊天标签数", - "desc": "同时开启的最大聊天标签数(3-10)。每个标签使用独立的 Qoder 会话。", - "warning": "超过 5 个标签可能会影响性能和内存使用。" - }, "enableAutoScroll": { "name": "流式传输时自动滚动", "desc": "在 Qoder 流式传输响应时自动滚动到底部。禁用后将停留在顶部,从头开始阅读。" diff --git a/src/i18n/locales/zh-TW.json b/src/i18n/locales/zh-TW.json index ca42762..d012c96 100644 --- a/src/i18n/locales/zh-TW.json +++ b/src/i18n/locales/zh-TW.json @@ -94,7 +94,6 @@ "chooseTarget": "分叉對話", "targetNewTab": "新分頁", "targetCurrentTab": "目前分頁", - "maxTabsReached": "無法分叉:已達到最大 {count} 個分頁", "notice": "已分叉到新分頁", "noticeCurrentTab": "已在目前分頁分叉", "failed": "分叉失敗:{error}", @@ -107,9 +106,6 @@ "commandNoMessages": "無法分叉:對話中沒有訊息", "commandNoAssistantUuid": "無法分叉:沒有帶識別碼的助手回覆" }, - "tabs": { - "maxTabsReached": "已達對話上限({count}),可在設定中調整上限。" - }, "bangBash": { "placeholder": "> 執行 bash 指令...", "commandPanel": "指令面板", @@ -352,11 +348,6 @@ "noNode": "在 PATH 中找不到 Node.js。請安裝 Node.js 或檢查 PATH 設定。" } }, - "maxTabs": { - "name": "最大聊天分頁數", - "desc": "同時開啟的最大聊天分頁數(3-10)。每個分頁使用獨立的 Qoder 對話。", - "warning": "超過 5 個分頁可能會影響效能和記憶體使用。" - }, "enableAutoScroll": { "name": "串流傳輸時自動捲動", "desc": "在 Qoder 串流傳輸回應時自動捲動到底部。停用後將停留在頂部,從頭開始閱讀。" diff --git a/src/i18n/types.ts b/src/i18n/types.ts index 33b8ad4..9c8d6c6 100644 --- a/src/i18n/types.ts +++ b/src/i18n/types.ts @@ -149,7 +149,6 @@ export type TranslationKey = | 'chat.fork.chooseTarget' | 'chat.fork.targetNewTab' | 'chat.fork.targetCurrentTab' - | 'chat.fork.maxTabsReached' | 'chat.fork.notice' | 'chat.fork.noticeCurrentTab' | 'chat.fork.failed' @@ -161,7 +160,6 @@ export type TranslationKey = | 'chat.fork.errorNoActiveTab' | 'chat.fork.commandNoMessages' | 'chat.fork.commandNoAssistantUuid' - | 'chat.tabs.maxTabsReached' // Send queue (multi-message queue above the composer) | 'chat.queue.title' @@ -327,9 +325,6 @@ export type TranslationKey = | 'settings.enableBangBash.name' | 'settings.enableBangBash.desc' | 'settings.enableBangBash.validation.noNode' - | 'settings.maxTabs.name' - | 'settings.maxTabs.desc' - | 'settings.maxTabs.warning' | 'settings.enableAutoScroll.name' | 'settings.enableAutoScroll.desc' | 'settings.deferMathRenderingDuringStreaming.name' diff --git a/src/main.ts b/src/main.ts index 0d1e47e..9664533 100644 --- a/src/main.ts +++ b/src/main.ts @@ -134,13 +134,8 @@ export default class QoderianPlugin extends Plugin { this.addCommand({ id: 'new-tab', name: t('commands.newTab'), - checkCallback: (checking: boolean) => { - if (!this.canCreateNewTab()) return false; - - if (!checking) { - void this.openNewTab(); - } - return true; + callback: () => { + void this.openNewTab(); }, }); @@ -364,22 +359,6 @@ export default class QoderianPlugin extends Plugin { return leaf; } - private canCreateNewTab(): boolean { - const hasQoderianLeaf = this.app.workspace.getLeavesOfType(VIEW_TYPE_QODERIAN).length > 0; - const view = this.getView(); - const tabManager = view?.getTabManager(); - - if (tabManager) { - return tabManager.canCreateTab(); - } - - if (hasQoderianLeaf) { - return false; - } - - return this.getLastKnownOpenTabCount() < this.getMaxTabsLimit(); - } - private async ensureViewOpen(): Promise { const existingView = this.getView(); if (existingView) { @@ -804,9 +783,4 @@ export default class QoderianPlugin extends Plugin { return this.lastKnownTabManagerState?.openTabs.length ?? 0; } - private getMaxTabsLimit(): number { - const maxTabs = this.settings.maxTabs ?? 3; - return Math.max(3, Math.min(10, maxTabs)); - } - } diff --git a/tests/integration/main.test.ts b/tests/integration/main.test.ts index 0a0da85..480c798 100644 --- a/tests/integration/main.test.ts +++ b/tests/integration/main.test.ts @@ -525,8 +525,7 @@ describe('QoderianPlugin', () => { const command = getRegisteredCommand('new-tab'); - expect(command.checkCallback(true)).toBe(true); - expect(command.checkCallback(false)).toBe(true); + command.callback(); await new Promise((resolve) => setImmediate(resolve)); @@ -561,8 +560,7 @@ describe('QoderianPlugin', () => { const command = getRegisteredCommand('new-tab'); - expect(command.checkCallback(true)).toBe(true); - expect(command.checkCallback(false)).toBe(true); + command.callback(); await new Promise((resolve) => setImmediate(resolve)); @@ -570,53 +568,14 @@ describe('QoderianPlugin', () => { expect(createNewTab).toHaveBeenCalledTimes(1); }); - it('stays unavailable when the open view is already at the tab limit', async () => { - await plugin.onload(); - - const mockView = { - getTabManager: jest.fn().mockReturnValue({ - canCreateTab: jest.fn().mockReturnValue(false), - }), - }; - - jest.spyOn(plugin, 'getView').mockReturnValue(mockView as any); - - const command = getRegisteredCommand('new-tab'); - - expect(command.checkCallback(true)).toBe(false); - }); - - it('keeps tab commands unavailable while a Qoderian leaf view is not initialized', async () => { + it('keeps the close-tab command unavailable while a Qoderian leaf view is not initialized', async () => { await plugin.onload(); mockApp.workspace.getLeavesOfType.mockReturnValue([{ view: {} }]); - for (const commandId of ['new-tab', 'close-current-tab']) { - const command = getRegisteredCommand(commandId); - - expect(() => command.checkCallback(true)).not.toThrow(); - expect(command.checkCallback(true)).toBe(false); - } - }); - - it('stays unavailable when reopening the persisted layout would already hit the tab limit', async () => { - (plugin.loadData as jest.Mock).mockResolvedValue({ - tabManagerState: { - openTabs: [ - { tabId: 'tab-1', conversationId: null }, - { tabId: 'tab-2', conversationId: null }, - { tabId: 'tab-3', conversationId: null }, - ], - activeTabId: 'tab-3', - }, - }); - - await plugin.onload(); - - jest.spyOn(plugin, 'getView').mockReturnValue(null); - - const command = getRegisteredCommand('new-tab'); + const command = getRegisteredCommand('close-current-tab'); + expect(() => command.checkCallback(true)).not.toThrow(); expect(command.checkCallback(true)).toBe(false); }); }); diff --git a/tests/unit/app/settings/settings-storage.test.ts b/tests/unit/app/settings/settings-storage.test.ts index f369b7f..0caeb13 100644 --- a/tests/unit/app/settings/settings-storage.test.ts +++ b/tests/unit/app/settings/settings-storage.test.ts @@ -59,8 +59,8 @@ describe('QoderianSettingsStorage', () => { const settings = await storage.load(); expect(settings.model).toBe('performance'); - expect(settings.maxTabs).toBe(2); expect(settings.permissionMode).toBe('auto'); + expect(settings).not.toHaveProperty('maxTabs'); expect(settings).not.toHaveProperty('customContextLimits'); expect(settings).not.toHaveProperty('sharedEnvironmentVariables'); expect(settings).not.toHaveProperty('envSnippets'); diff --git a/tests/unit/features/chat/chat-view.test.ts b/tests/unit/features/chat/chat-view.test.ts index 93b0866..0ddba52 100644 --- a/tests/unit/features/chat/chat-view.test.ts +++ b/tests/unit/features/chat/chat-view.test.ts @@ -2,14 +2,13 @@ import { createMockEl } from '@test/helpers/mock-element'; import { Notice, Platform, Scope } from 'obsidian'; import { QoderianView } from '@/features/chat/chat-view'; -import { setLocale, t } from '@/i18n/i18n'; +import { setLocale } from '@/i18n/i18n'; const MockScope = Scope as typeof Scope & { instances: Scope[] }; const MockNotice = Notice as unknown as jest.Mock; function createViewHarness(options: { createdTab?: unknown; - maxTabs?: number; }): { createTab: jest.Mock; view: any; @@ -18,7 +17,7 @@ function createViewHarness(options: { const view = Object.create(QoderianView.prototype) as any; view.plugin = { - settings: { maxTabs: options.maxTabs ?? 4 }, + settings: {}, }; view.tabManager = { createTab }; @@ -31,17 +30,6 @@ describe('QoderianView tab controls', () => { setLocale('en'); }); - it('notices the limit and points to settings when no tab can be created', async () => { - const { view } = createViewHarness({ createdTab: null, maxTabs: 4 }); - - await view.createNewTab(); - - expect(MockNotice).toHaveBeenCalledTimes(1); - expect(MockNotice.mock.calls[0][0]).toBe( - t('chat.tabs.maxTabsReached', { count: '4' }), - ); - }); - it('stays quiet when a new tab is created', async () => { const { createTab, view } = createViewHarness({ createdTab: { id: 'tab-2' } }); @@ -51,42 +39,32 @@ describe('QoderianView tab controls', () => { expect(MockNotice).not.toHaveBeenCalled(); }); - it('hides the strip and the new-session button at the limit while the redesign is off', () => { + it('hides the strip for a single tab while the redesign is off', () => { const tabBarContainerEl = createMockEl(); - const newTabButtonEl = createMockEl(); const view = Object.create(QoderianView.prototype) as any; view.plugin = { settings: {} }; view.tabManager = { getTabCount: jest.fn().mockReturnValue(1), - canCreateTab: jest.fn().mockReturnValue(false), }; view.tabBarContainerEl = tabBarContainerEl; - view.newTabButtonEl = newTabButtonEl; - view.refreshTabControls(); + view.updateTabBarVisibility(); expect(tabBarContainerEl.hasClass('qoderian-hidden')).toBe(true); - expect(newTabButtonEl.hasClass('qoderian-hidden')).toBe(true); - expect(newTabButtonEl.getAttribute('aria-hidden')).toBe('true'); }); - it('keeps a single session visible and the new-session button enabled while the redesign is on', () => { + it('keeps a single session visible while the redesign is on', () => { const tabBarContainerEl = createMockEl(); - const newTabButtonEl = createMockEl(); const view = Object.create(QoderianView.prototype) as any; view.plugin = { settings: { enableSessionTabsRedesign: true } }; view.tabManager = { getTabCount: jest.fn().mockReturnValue(1), - canCreateTab: jest.fn().mockReturnValue(false), }; view.tabBarContainerEl = tabBarContainerEl; - view.newTabButtonEl = newTabButtonEl; - view.refreshTabControls(); + view.updateTabBarVisibility(); expect(tabBarContainerEl.hasClass('qoderian-hidden')).toBe(false); - expect(newTabButtonEl.hasClass('qoderian-hidden')).toBe(false); - expect(newTabButtonEl.getAttribute('aria-disabled')).toBeNull(); }); it('opens a history conversation in a new tab when the redesign is on', async () => { @@ -118,23 +96,6 @@ describe('QoderianView tab controls', () => { expect(view.historyDropdown.hasClass('visible')).toBe(false); }); - it('notices the limit when a history conversation cannot open a new tab', async () => { - const openConversation = jest.fn().mockResolvedValue(false); - const view = Object.create(QoderianView.prototype) as any; - view.plugin = { settings: { maxTabs: 3, enableSessionTabsRedesign: true } }; - view.tabManager = { openConversation }; - view.historyDropdown = createMockEl(); - view.historyDropdown.addClass('visible'); - - await view.openHistoryConversation('conv-9'); - - expect(MockNotice).toHaveBeenCalledTimes(1); - expect(MockNotice.mock.calls[0][0]).toBe( - t('chat.tabs.maxTabsReached', { count: '3' }), - ); - expect(view.historyDropdown.hasClass('visible')).toBe(false); - }); - it('keeps tab controls in the view-owned input row', () => { const navRowContent = createMockEl(); const inputNavRowHostEl = createMockEl(); diff --git a/tests/unit/features/chat/tabs/tab-manager-open-conversation.test.ts b/tests/unit/features/chat/tabs/tab-manager-open-conversation.test.ts index 9a94fab..559fd4e 100644 --- a/tests/unit/features/chat/tabs/tab-manager-open-conversation.test.ts +++ b/tests/unit/features/chat/tabs/tab-manager-open-conversation.test.ts @@ -3,7 +3,6 @@ import { createMockEl } from '@test/helpers/mock-element'; import { TabManager } from '@/features/chat/tabs/tab-manager'; function makeManager(options: { - maxTabs: number; tabs: Array<{ id: string; conversationId: string | null }>; redesign?: boolean; }): { @@ -13,7 +12,6 @@ function makeManager(options: { const switchTo = jest.fn().mockResolvedValue(undefined); const plugin = { settings: { - maxTabs: options.maxTabs, enableSessionTabsRedesign: options.redesign ?? true, }, app: { workspace: {} }, @@ -34,25 +32,24 @@ function makeManager(options: { } describe('TabManager.openConversation', () => { - it('refuses a new tab at the limit instead of replacing the active tab', async () => { + it('opens a new tab when requested instead of replacing the active tab', async () => { const { manager, switchTo } = makeManager({ - maxTabs: 3, tabs: [ { id: 'tab-1', conversationId: 'conv-1' }, { id: 'tab-2', conversationId: null }, { id: 'tab-3', conversationId: null }, ], }); + const createTab = jest.spyOn(manager, 'createTab').mockResolvedValue({} as any); - const opened = await manager.openConversation('conv-history', { preferNewTab: true }); + await manager.openConversation('conv-history', { preferNewTab: true }); - expect(opened).toBe(false); + expect(createTab).toHaveBeenCalledWith('conv-history', undefined, { activate: true }); expect(switchTo).not.toHaveBeenCalled(); }); it('switches to the existing tab when the conversation is already open', async () => { const { manager } = makeManager({ - maxTabs: 3, tabs: [ { id: 'tab-1', conversationId: 'conv-1' }, { id: 'tab-2', conversationId: null }, @@ -61,27 +58,23 @@ describe('TabManager.openConversation', () => { }); const switchTab = jest.spyOn(manager, 'switchToTab').mockResolvedValue(undefined); - const opened = await manager.openConversation('conv-1', { preferNewTab: true }); + await manager.openConversation('conv-1', { preferNewTab: true }); - expect(opened).toBe(true); expect(switchTab).toHaveBeenCalledWith('tab-1'); }); it('still opens in the active tab when a new tab is not requested', async () => { const { manager, switchTo } = makeManager({ - maxTabs: 3, tabs: [{ id: 'tab-1', conversationId: 'conv-1' }], }); - const opened = await manager.openConversation('conv-2'); + await manager.openConversation('conv-2'); - expect(opened).toBe(true); expect(switchTo).toHaveBeenCalledWith('conv-2'); }); - it('falls back to the active tab at the limit while the redesign is off', async () => { + it('opens a new tab when requested while the redesign is off', async () => { const { manager, switchTo } = makeManager({ - maxTabs: 3, redesign: false, tabs: [ { id: 'tab-1', conversationId: 'conv-1' }, @@ -89,10 +82,11 @@ describe('TabManager.openConversation', () => { { id: 'tab-3', conversationId: null }, ], }); + const createTab = jest.spyOn(manager, 'createTab').mockResolvedValue({} as any); - const opened = await manager.openConversation('conv-history', { preferNewTab: true }); + await manager.openConversation('conv-history', { preferNewTab: true }); - expect(opened).toBe(true); - expect(switchTo).toHaveBeenCalledWith('conv-history'); + expect(createTab).toHaveBeenCalledWith('conv-history', undefined, { activate: true }); + expect(switchTo).not.toHaveBeenCalled(); }); -}); +}); \ No newline at end of file diff --git a/tests/unit/features/chat/tabs/tab-manager-restore.test.ts b/tests/unit/features/chat/tabs/tab-manager-restore.test.ts index cbb4701..1cb25fe 100644 --- a/tests/unit/features/chat/tabs/tab-manager-restore.test.ts +++ b/tests/unit/features/chat/tabs/tab-manager-restore.test.ts @@ -18,7 +18,7 @@ describe('TabManager restore diagnostics', () => { function makeManager(): TabManager { const plugin = { - settings: { maxTabs: 5 }, + settings: {}, getConversationById: jest.fn(async () => undefined), } as any; const containerEl = createMockEl() as unknown as HTMLElement; diff --git a/tests/unit/i18n/locales.test.ts b/tests/unit/i18n/locales.test.ts index a432964..f55bd48 100644 --- a/tests/unit/i18n/locales.test.ts +++ b/tests/unit/i18n/locales.test.ts @@ -117,7 +117,6 @@ const localizedKeys = [ 'feedback.noticeFailed', 'nav.newSession', 'nav.closeSession', - 'chat.tabs.maxTabsReached', 'settings.enableSessionTabsRedesign.name', 'settings.enableSessionTabsRedesign.desc', ] as const;