diff --git a/src/features/chat/app-server/actions/threads.ts b/src/features/chat/app-server/actions/threads.ts index 73b162f2..637e9929 100644 --- a/src/features/chat/app-server/actions/threads.ts +++ b/src/features/chat/app-server/actions/threads.ts @@ -1,10 +1,10 @@ -import type { ThreadCatalogEvent } from "../../../../app-server/query/thread-catalog"; import { startThread as startAppServerThread, threadActivationSnapshotFromAppServerResponse, } from "../../../../app-server/services/threads"; import { runtimeConfigOrDefault } from "../../../../domain/runtime/config"; import type { Thread } from "../../../../domain/threads/model"; +import type { ThreadCatalogEvent } from "../../../threads/catalog/thread-catalog"; import { resumedThreadAction } from "../../application/state/actions"; import type { ChatState } from "../../application/state/root-reducer"; import type { RuntimeSnapshot } from "../../domain/runtime/snapshot"; diff --git a/src/features/chat/app-server/inbound/handler.ts b/src/features/chat/app-server/inbound/handler.ts index 04824deb..d9d8b97b 100644 --- a/src/features/chat/app-server/inbound/handler.ts +++ b/src/features/chat/app-server/inbound/handler.ts @@ -1,5 +1,4 @@ import type { RequestId, ServerNotification, ServerRequest } from "../../../../app-server/connection/rpc-messages"; -import type { ThreadCatalogEvent } from "../../../../app-server/query/thread-catalog"; import { routeServerRequest, serverRequestApprovalResponse, @@ -16,6 +15,7 @@ import { } from "../../../../domain/pending-requests/model"; import type { ThreadConversationSummary } from "../../../../domain/threads/transcript"; import type { LocalIdSource } from "../../../../shared/id/local-id"; +import type { ThreadCatalogEvent } from "../../../threads/catalog/thread-catalog"; import { activeTurnId } from "../../application/conversation/turn-state"; import type { ChatAction, ChatState } from "../../application/state/root-reducer"; import type { ChatStateStore } from "../../application/state/store"; diff --git a/src/features/chat/app-server/inbound/notification-plan.ts b/src/features/chat/app-server/inbound/notification-plan.ts index e2c18c5c..9b35ca33 100644 --- a/src/features/chat/app-server/inbound/notification-plan.ts +++ b/src/features/chat/app-server/inbound/notification-plan.ts @@ -1,10 +1,10 @@ import type { ServerNotification } from "../../../../app-server/connection/rpc-messages"; -import type { ThreadCatalogEvent } from "../../../../app-server/query/thread-catalog"; import { threadFromAppServerRecord } from "../../../../app-server/services/threads"; import { threadTokenUsageFromRuntimeUsage } from "../../../../domain/runtime/metrics"; import { normalizeExplicitThreadName } from "../../../../domain/threads/model"; import type { ThreadConversationSummary } from "../../../../domain/threads/transcript"; import { jsonPreview } from "../../../../shared/text/preview"; +import type { ThreadCatalogEvent } from "../../../threads/catalog/thread-catalog"; import { activeTurnId, pendingTurnStart as pendingTurnStartForState } from "../../application/conversation/turn-state"; import { activeThreadSettingsAppliedAction } from "../../application/state/actions"; import { messageStreamItems } from "../../application/state/message-stream"; diff --git a/src/features/chat/application/threads/thread-management-actions.ts b/src/features/chat/application/threads/thread-management-actions.ts index 576e6484..4670705a 100644 --- a/src/features/chat/application/threads/thread-management-actions.ts +++ b/src/features/chat/application/threads/thread-management-actions.ts @@ -28,7 +28,7 @@ export interface ThreadManagementActionsHost { interface ThreadManagementOperations { renameThread(threadId: string, value: string): Promise; - archiveThread(threadId: string, options?: { saveMarkdown?: boolean; closeOpenPanels?: boolean }): Promise; + archiveThread(threadId: string, options?: { saveMarkdown?: boolean }): Promise; } export interface ThreadManagementActions { diff --git a/src/features/chat/host/contracts.ts b/src/features/chat/host/contracts.ts index 34f02dee..0df65953 100644 --- a/src/features/chat/host/contracts.ts +++ b/src/features/chat/host/contracts.ts @@ -2,13 +2,13 @@ import type { App, Component, EventRef } from "obsidian"; import type { AppServerClient } from "../../../app-server/connection/client"; import type { AppServerQueryContext } from "../../../app-server/query/keys"; -import type { ThreadCatalogActiveReader, ThreadCatalogEventSink } from "../../../app-server/query/thread-catalog"; import type { ModelMetadata, ReasoningEffort } from "../../../domain/catalog/metadata"; import type { PendingRequestCounts } from "../../../domain/pending-requests/aggregate"; import type { SharedServerMetadata } from "../../../domain/server/metadata"; import type { ArchiveExportSettings } from "../../../domain/threads/archive-markdown"; import type { ObservedResultListener } from "../../../shared/query/observed-result"; import type { SendShortcut } from "../../../shared/ui/keyboard"; +import type { ThreadCatalogActiveReader, ThreadCatalogEventSink } from "../../threads/catalog/thread-catalog"; import type { ArchiveExportDestination } from "../../threads/workflows/archive-export"; import type { TurnDiffViewState } from "../../turn-diff/model"; diff --git a/src/features/thread-picker/modal.obsidian.ts b/src/features/thread-picker/modal.obsidian.ts index 715c4ab5..e68299bd 100644 --- a/src/features/thread-picker/modal.obsidian.ts +++ b/src/features/thread-picker/modal.obsidian.ts @@ -1,9 +1,9 @@ import { type App, Notice, Platform, SuggestModal } from "obsidian"; -import type { ThreadCatalogActiveReader } from "../../app-server/query/thread-catalog"; import { type Thread, threadRecencyAt } from "../../domain/threads/model"; import { threadDisplayTitle } from "../../domain/threads/title"; import { shortThreadId } from "../../shared/id/thread-id"; +import type { ThreadCatalogActiveReader } from "../threads/catalog/thread-catalog"; export interface ThreadPickerHost { readonly app: App; diff --git a/src/features/threads-view/session.ts b/src/features/threads-view/session.ts index 194d2af9..599dfdbc 100644 --- a/src/features/threads-view/session.ts +++ b/src/features/threads-view/session.ts @@ -2,12 +2,12 @@ import { Notice } from "obsidian"; import type { AppServerClientAccess } from "../../app-server/connection/client-access"; import { isStaleAppServerSharedQueryContextError } from "../../app-server/query/shared-queries"; -import type { ThreadCatalogActiveReader, ThreadCatalogEventSink } from "../../app-server/query/thread-catalog"; import type { ReasoningEffort } from "../../domain/catalog/metadata"; import type { ArchiveExportSettings } from "../../domain/threads/archive-markdown"; import type { Thread } from "../../domain/threads/model"; import type { ObservedResult } from "../../shared/query/observed-result"; import { observedInitialError, observedInitialLoading, observedValue } from "../../shared/query/observed-result"; +import type { ThreadCatalogActiveReader, ThreadCatalogEventSink } from "../threads/catalog/thread-catalog"; import type { ArchiveExportDestination } from "../threads/workflows/archive-export"; import { createThreadOperations, type ThreadOperations } from "../threads/workflows/thread-operations"; import { createThreadTitleService, type ThreadTitleService } from "../threads/workflows/thread-title-service"; @@ -36,6 +36,7 @@ export interface ThreadsViewHost { openNewPanel(): Promise; openThreadInAvailableView(threadId: string): Promise; openPanelActivities(): readonly ThreadsViewPanelActivity[]; + closeOpenPanelsForThread(threadId: string): void; } type ThreadsViewThreadCatalog = ThreadCatalogActiveReader & ThreadCatalogEventSink; @@ -328,8 +329,8 @@ export class ThreadsViewSession { try { await this.operations.archiveThread(threadId, { saveMarkdown, - closeOpenPanels: true, }); + this.host.closeOpenPanelsForThread(threadId); if (this.archiveConfirmThreadId === threadId) this.archiveConfirmThreadId = null; this.renameStates.delete(threadId); } catch (error) { diff --git a/src/app-server/query/thread-catalog.ts b/src/features/threads/catalog/thread-catalog.ts similarity index 98% rename from src/app-server/query/thread-catalog.ts rename to src/features/threads/catalog/thread-catalog.ts index 2a0383be..a5aee486 100644 --- a/src/app-server/query/thread-catalog.ts +++ b/src/features/threads/catalog/thread-catalog.ts @@ -1,5 +1,5 @@ -import type { Thread } from "../../domain/threads/model"; -import type { ObservedResultListener } from "../../shared/query/observed-result"; +import type { Thread } from "../../../domain/threads/model"; +import type { ObservedResultListener } from "../../../shared/query/observed-result"; type ThreadListObserver = ObservedResultListener; @@ -51,7 +51,7 @@ export type ThreadCatalogEvent = | { type: "thread-forked"; thread: Thread } | { type: "thread-touched"; threadId: string; recencyAt?: number | null } | { type: "thread-renamed"; threadId: string; name: string | null } - | { type: "thread-archived"; threadId: string; options?: { closeOpenPanels?: boolean } } + | { type: "thread-archived"; threadId: string } | { type: "thread-deleted"; threadId: string } | { type: "thread-restored"; thread: Thread } | { type: "thread-unarchived"; threadId: string }; diff --git a/src/features/threads/workflows/thread-operations.ts b/src/features/threads/workflows/thread-operations.ts index 7554100d..08ca19aa 100644 --- a/src/features/threads/workflows/thread-operations.ts +++ b/src/features/threads/workflows/thread-operations.ts @@ -1,5 +1,4 @@ import type { AppServerClientAccess } from "../../../app-server/connection/client-access"; -import type { ThreadCatalogEventSink } from "../../../app-server/query/thread-catalog"; import { archiveThread as archiveAppServerThread, readThreadForArchiveExport, @@ -7,6 +6,7 @@ import { } from "../../../app-server/services/threads"; import type { ArchiveExportSettings } from "../../../domain/threads/archive-markdown"; import { normalizeExplicitThreadName } from "../../../domain/threads/model"; +import type { ThreadCatalogEventSink } from "../catalog/thread-catalog"; import { type ArchiveExportDestination, exportArchivedThreadMarkdown } from "./archive-export"; export interface ThreadOperationsHost { @@ -24,7 +24,6 @@ export interface ThreadOperationsHost { interface ArchiveThreadOptions { saveMarkdown?: boolean; - closeOpenPanels?: boolean; } export interface ArchiveThreadResult { @@ -89,10 +88,6 @@ async function archiveThread( if (exportedPath) { host.notice(`Saved archived thread to ${exportedPath}.`); } - host.catalog.apply( - options.closeOpenPanels === undefined - ? { type: "thread-archived", threadId } - : { type: "thread-archived", threadId, options: { closeOpenPanels: options.closeOpenPanels } }, - ); + host.catalog.apply({ type: "thread-archived", threadId }); return { exportedPath }; } diff --git a/src/plugin-runtime.ts b/src/plugin-runtime.ts index 389e7c82..ed51fff3 100644 --- a/src/plugin-runtime.ts +++ b/src/plugin-runtime.ts @@ -5,7 +5,6 @@ import { withShortLivedAppServerClient } from "./app-server/connection/short-liv import { AppServerQueryCache } from "./app-server/query/cache"; import { type AppServerQueryContext, appServerQueryContextIsComplete } from "./app-server/query/keys"; import { AppServerSharedQueries } from "./app-server/query/shared-queries"; -import { createThreadCatalog, type ThreadCatalog, type ThreadCatalogEvent } from "./app-server/query/thread-catalog"; import { VIEW_TYPE_CODEX_THREADS, VIEW_TYPE_CODEX_TURN_DIFF } from "./constants"; import { hasPendingRequests } from "./domain/pending-requests/aggregate"; import type { @@ -17,6 +16,7 @@ import type { CodexChatHost, } from "./features/chat/host/contracts"; import { openThreadPicker, type ThreadPickerHost } from "./features/thread-picker/modal.obsidian"; +import { createThreadCatalog, type ThreadCatalog, type ThreadCatalogEvent } from "./features/threads/catalog/thread-catalog"; import type { ThreadsViewHost, ThreadsViewSettingsAccess } from "./features/threads-view/session"; import type { ThreadsViewPanelActivity } from "./features/threads-view/state"; import { CodexThreadsView } from "./features/threads-view/view.obsidian"; @@ -157,6 +157,9 @@ export class CodexPanelRuntime implements AppServerClientAccess { openNewPanel: () => this.panels.openNewPanel(), openThreadInAvailableView: (threadId) => this.panels.openThreadInAvailableView(threadId), openPanelActivities: () => this.openPanelActivities(), + closeOpenPanelsForThread: (threadId) => { + this.closeOpenPanelsForThread(threadId); + }, }; } @@ -221,12 +224,15 @@ export class CodexPanelRuntime implements AppServerClientAccess { } } - private applyThreadArchived(threadId: string, archiveOptions: { closeOpenPanels?: boolean } = {}): void { - const leavesToClose = archiveOptions.closeOpenPanels ? this.panels.panelLeavesForThread(threadId) : []; + private applyThreadArchived(threadId: string): void { for (const view of this.panels.panelViews()) { const surface: ChatSharedThreadSurface = view.surface; surface.applyThreadArchived(threadId); } + } + + private closeOpenPanelsForThread(threadId: string): void { + const leavesToClose = this.panels.panelLeavesForThread(threadId); for (const leaf of leavesToClose) { leaf.detach(); } @@ -242,7 +248,7 @@ export class CodexPanelRuntime implements AppServerClientAccess { private applyThreadCatalogSurfaceEvent(event: ThreadCatalogEvent): void { switch (event.type) { case "thread-archived": - this.applyThreadArchived(event.threadId, event.options); + this.applyThreadArchived(event.threadId); return; case "thread-renamed": this.applyThreadRenamed(event.threadId, event.name); diff --git a/src/settings/app-server-dynamic-data.ts b/src/settings/app-server-dynamic-data.ts index 2da28c9a..9f79241d 100644 --- a/src/settings/app-server-dynamic-data.ts +++ b/src/settings/app-server-dynamic-data.ts @@ -1,10 +1,10 @@ import type { AppServerClient } from "../app-server/connection/client"; import type { AppServerClientAccess } from "../app-server/connection/client-access"; import { isStaleAppServerSharedQueryContextError } from "../app-server/query/shared-queries"; -import type { ThreadCatalogArchivedReader, ThreadCatalogEventSink } from "../app-server/query/thread-catalog"; import { listHookCatalog, setHookItemEnabled, trustHookItem } from "../app-server/services/catalog"; import { deleteThread, restoreArchivedThread as restoreArchivedThreadOnAppServer } from "../app-server/services/threads"; import type { ModelMetadata } from "../domain/catalog/metadata"; +import type { ThreadCatalogArchivedReader, ThreadCatalogEventSink } from "../features/threads/catalog/thread-catalog"; import type { ObservedResultListener } from "../shared/query/observed-result"; import { type SettingsDynamicDataAccess, type SettingsHookCatalog, StaleSettingsDynamicDataContextError } from "./dynamic-data"; diff --git a/tests/features/chat/app-server/inbound/handler.test.ts b/tests/features/chat/app-server/inbound/handler.test.ts index 371631a5..ccbbc292 100644 --- a/tests/features/chat/app-server/inbound/handler.test.ts +++ b/tests/features/chat/app-server/inbound/handler.test.ts @@ -2,7 +2,6 @@ import { describe, expect, it, vi } from "vitest"; import type { ServerNotification, ServerRequest } from "../../../../../src/app-server/connection/rpc-messages"; import { appServerApprovalRequest, appServerUserInputRequest } from "../../../../../src/app-server/protocol/server-requests"; import type { TurnRecord } from "../../../../../src/app-server/protocol/turn"; -import type { ThreadCatalogEvent } from "../../../../../src/app-server/query/thread-catalog"; import type { Thread as PanelThread } from "../../../../../src/domain/threads/model"; import { type ChatInboundHandler, @@ -13,6 +12,7 @@ import { pendingTurnStart } from "../../../../../src/features/chat/application/c import { type ChatAction, type ChatState, chatReducer } from "../../../../../src/features/chat/application/state/root-reducer"; import type { ChatStateStore } from "../../../../../src/features/chat/application/state/store"; import { attachHookRunsToTurn } from "../../../../../src/features/chat/domain/message-stream/updates"; +import type { ThreadCatalogEvent } from "../../../../../src/features/threads/catalog/thread-catalog"; import { createLocalIdSource } from "../../../../../src/shared/id/local-id"; import { chatStateMessageStreamItems, withChatStateMessageStreamItems } from "../../support/message-stream"; import { chatStateFixture, chatStateWith } from "../../support/state"; diff --git a/tests/features/chat/host/view-connection.test.ts b/tests/features/chat/host/view-connection.test.ts index bc039cfb..a3fe9a03 100644 --- a/tests/features/chat/host/view-connection.test.ts +++ b/tests/features/chat/host/view-connection.test.ts @@ -4,13 +4,13 @@ import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vite import type { ServerNotification } from "../../../../src/app-server/connection/rpc-messages"; import { modelMetadataFromCatalogModels } from "../../../../src/app-server/protocol/catalog"; import type { ThreadRecord } from "../../../../src/app-server/protocol/thread"; -import type { ThreadCatalogEvent } from "../../../../src/app-server/query/thread-catalog"; import type { ModelMetadata } from "../../../../src/domain/catalog/metadata"; import { emptyRuntimeConfigSnapshot } from "../../../../src/domain/runtime/config"; import { createServerDiagnostics } from "../../../../src/domain/server/diagnostics"; import type { SharedServerMetadata } from "../../../../src/domain/server/metadata"; import type { Thread } from "../../../../src/domain/threads/model"; import type { CodexChatHost } from "../../../../src/features/chat/host/contracts"; +import type { ThreadCatalogEvent } from "../../../../src/features/threads/catalog/thread-catalog"; import { type CodexPanelSettings, DEFAULT_SETTINGS } from "../../../../src/settings/model"; import type { ObservedResult } from "../../../../src/shared/query/observed-result"; import { notices } from "../../../mocks/obsidian"; diff --git a/tests/features/threads-view/view.test.ts b/tests/features/threads-view/view.test.ts index 3d928221..f8dff7f9 100644 --- a/tests/features/threads-view/view.test.ts +++ b/tests/features/threads-view/view.test.ts @@ -296,8 +296,10 @@ describe("CodexThreadsView", () => { "thread/archive": archiveThread, }); const applyThreadCatalogEvent = vi.fn(); + const closeOpenPanelsForThread = vi.fn(); const host = threadsHost({ threadCatalog: { apply: applyThreadCatalogEvent }, + closeOpenPanelsForThread, }); const view = await threadsView(host); @@ -310,8 +312,8 @@ describe("CodexThreadsView", () => { expect(applyThreadCatalogEvent).toHaveBeenCalledWith({ type: "thread-archived", threadId: "thread", - options: { closeOpenPanels: true }, }); + expect(closeOpenPanelsForThread).toHaveBeenCalledWith("thread"); }); }); @@ -554,6 +556,7 @@ function threadsHost(overrides: Record = {}) { openNewPanel: vi.fn().mockResolvedValue(undefined), openThreadInAvailableView: vi.fn().mockResolvedValue(undefined), openPanelActivities: vi.fn(() => []), + closeOpenPanelsForThread: vi.fn(), threadCatalog: { apply: vi.fn(), loadActive: vi.fn(async () => []), diff --git a/tests/app-server/thread-catalog.test.ts b/tests/features/threads/catalog/thread-catalog.test.ts similarity index 98% rename from tests/app-server/thread-catalog.test.ts rename to tests/features/threads/catalog/thread-catalog.test.ts index 8d79ad7c..48922150 100644 --- a/tests/app-server/thread-catalog.test.ts +++ b/tests/features/threads/catalog/thread-catalog.test.ts @@ -1,9 +1,9 @@ import { describe, expect, it, type Mock, vi } from "vitest"; -import { AppServerQueryCache } from "../../src/app-server/query/cache"; -import { AppServerSharedQueries } from "../../src/app-server/query/shared-queries"; -import { createThreadCatalog, type ThreadCatalogEventObserver } from "../../src/app-server/query/thread-catalog"; -import type { Thread } from "../../src/domain/threads/model"; +import { AppServerQueryCache } from "../../../../src/app-server/query/cache"; +import { AppServerSharedQueries } from "../../../../src/app-server/query/shared-queries"; +import type { Thread } from "../../../../src/domain/threads/model"; +import { createThreadCatalog, type ThreadCatalogEventObserver } from "../../../../src/features/threads/catalog/thread-catalog"; describe("ThreadCatalog", () => { it("applies active thread snapshot replacement events through the catalog boundary", () => { @@ -79,7 +79,7 @@ describe("ThreadCatalog", () => { catalog.apply({ type: "active-list-snapshot-received", threads: [thread("thread"), thread("other")] }); catalog.apply({ type: "archived-list-snapshot-received", threads: [thread("archived", true)] }); - catalog.apply({ type: "thread-archived", threadId: "thread", options: { closeOpenPanels: true } }); + catalog.apply({ type: "thread-archived", threadId: "thread" }); expect(catalog.activeSnapshot()).toEqual([thread("other")]); expect(catalog.archivedSnapshot()).toEqual([{ ...thread("thread"), archived: true }, thread("archived", true)]); @@ -320,7 +320,7 @@ describe("ThreadCatalog", () => { catalog.apply({ type: "thread-started", thread: thread("started") }); catalog.apply({ type: "thread-touched", threadId: "existing", recencyAt: 20 }); catalog.apply({ type: "thread-renamed", threadId: "started", name: "Started" }); - catalog.apply({ type: "thread-archived", threadId: "existing", options: { closeOpenPanels: true } }); + catalog.apply({ type: "thread-archived", threadId: "existing" }); expect(catalog.activeSnapshot()).toEqual([{ ...thread("started"), name: "Started" }]); expect(catalog.archivedSnapshot()).toEqual([thread("existing", true, { recencyAt: 20 }), thread("archived", true)]); diff --git a/tests/features/threads/workflows/thread-operations.test.ts b/tests/features/threads/workflows/thread-operations.test.ts index 44c47771..40d9654b 100644 --- a/tests/features/threads/workflows/thread-operations.test.ts +++ b/tests/features/threads/workflows/thread-operations.test.ts @@ -31,7 +31,7 @@ describe("ThreadOperations", () => { it("archives a thread, reports exported markdown, and notifies shared surfaces", async () => { const { operations, catalog, notice, client, archiveDestination } = operationsFixture(); - await expect(operations.archiveThread("thread", { saveMarkdown: true, closeOpenPanels: true })).resolves.toEqual({ + await expect(operations.archiveThread("thread", { saveMarkdown: true })).resolves.toEqual({ exportedPath: "Archive/Archived Thread abcdef12.md", }); @@ -46,7 +46,6 @@ describe("ThreadOperations", () => { expect(catalog.apply).toHaveBeenCalledWith({ type: "thread-archived", threadId: "thread", - options: { closeOpenPanels: true }, }); }); diff --git a/tests/main.test.ts b/tests/main.test.ts index 88404b3d..475fbe9b 100644 --- a/tests/main.test.ts +++ b/tests/main.test.ts @@ -496,7 +496,7 @@ describe("CodexPanelPlugin workspace panel reconciliation", () => { expect(secondArchived).toHaveBeenCalledWith("thread-1"); }); - it("closes matching chat panels only when archive notification requests it", async () => { + it("keeps catalog archive notifications separate from explicit panel close requests", async () => { const { CodexChatView } = await import("../src/features/chat/host/view.obsidian"); const restoredMatchingLeaf = leaf({ state: { threadId: "thread-1", threadTitle: "Restored" } }); const matchingLeaf = leaf(); @@ -515,7 +515,7 @@ describe("CodexPanelPlugin workspace panel reconciliation", () => { expect(matchingLeaf.detach).not.toHaveBeenCalled(); expect(otherLeaf.detach).not.toHaveBeenCalled(); - threadCatalog(plugin).apply({ type: "thread-archived", threadId: "thread-1", options: { closeOpenPanels: true } }); + plugin.runtime.threadsHost().closeOpenPanelsForThread("thread-1"); expect(restoredMatchingLeaf.detach).toHaveBeenCalledOnce(); expect(matchingLeaf.detach).toHaveBeenCalledOnce(); diff --git a/tests/settings/settings-tab.test.ts b/tests/settings/settings-tab.test.ts index e05b83d2..d3c32f5c 100644 --- a/tests/settings/settings-tab.test.ts +++ b/tests/settings/settings-tab.test.ts @@ -6,9 +6,9 @@ import type { AppServerClientAccessOptions } from "../../src/app-server/connecti import type { CatalogHookMetadata, CatalogModel } from "../../src/app-server/protocol/catalog"; import { modelMetadataFromCatalogModels } from "../../src/app-server/protocol/catalog"; import type { ThreadRecord } from "../../src/app-server/protocol/thread"; -import type { ThreadCatalogEvent } from "../../src/app-server/query/thread-catalog"; import type { ModelMetadata, ReasoningEffort } from "../../src/domain/catalog/metadata"; import type { Thread } from "../../src/domain/threads/model"; +import type { ThreadCatalogEvent } from "../../src/features/threads/catalog/thread-catalog"; import { createSettingsAppServerDynamicData } from "../../src/settings/app-server-dynamic-data"; import type { SettingsDynamicDataAccess } from "../../src/settings/dynamic-data"; import { SettingsDynamicSectionsController, type SettingsDynamicSectionsSnapshot } from "../../src/settings/dynamic-sections-controller";