Add Biome assist import organization

This commit is contained in:
murashit 2026-06-24 14:44:16 +09:00
parent ce99e76a2b
commit 47c4ed4631
225 changed files with 768 additions and 813 deletions

View file

@ -22,6 +22,14 @@
"indentStyle": "space",
"lineWidth": 140
},
"assist": {
"actions": {
"source": {
"noDuplicateClasses": "on",
"organizeImports": "on"
}
}
},
"linter": {
"rules": {
"preset": "recommended",

View file

@ -10,9 +10,9 @@ npm run format
npm run check
```
Run `npm run format` after edits and before `npm run check` so Biome formatting issues are fixed upfront. `npm run check` runs TypeScript type checking, unit tests, lint checks, Biome format check, CSS verification, and the production esbuild bundle. `npm run check:ci` uses the same checks with CI cache settings for TypeScript, tests, and ESLint. Use `npm run build` when you need to refresh Obsidian-loaded assets without running the full check.
Run `npm run format` after edits and before `npm run check` so Biome formatting and import organization issues are fixed upfront. `npm run check` runs TypeScript type checking, unit tests, lint checks, Biome format and assist checks, CSS verification, and the production esbuild bundle. `npm run check:ci` uses the same checks with CI cache settings for TypeScript, tests, and ESLint. Use `npm run build` when you need to refresh Obsidian-loaded assets without running the full check.
Formatting and general JavaScript/TypeScript/JSON linting and JavaScript/TypeScript/CSS/JSON formatting are handled by Biome. The Biome lint configuration explicitly uses the recommended preset, with accessibility diagnostics downgraded to info while the Obsidian-specific UI semantics are reviewed rule by rule. Biome also owns floating Promise, import cycle, and Preact hook dependency/order checks. CSS is formatted by Biome but excluded from Biome linting so CSS lint policy stays centralized in Stylelint and the project CSS usage script. ESLint remains for unsafe-any TypeScript parser-service checks, Obsidian plugin API/text policy checks, and Codex Panel responsibility-boundary checks.
Formatting, import organization, general JavaScript/TypeScript/JSON linting, and JavaScript/TypeScript/CSS/JSON formatting are handled by Biome. The Biome lint configuration explicitly uses the recommended preset, with accessibility diagnostics downgraded to info while the Obsidian-specific UI semantics are reviewed rule by rule. Biome also owns floating Promise, import cycle, and Preact hook dependency/order checks. CSS is formatted by Biome but excluded from Biome linting so CSS lint policy stays centralized in Stylelint and the project CSS usage script. ESLint remains for unsafe-any TypeScript parser-service checks, Obsidian plugin API/text policy checks, and Codex Panel responsibility-boundary checks.
## Generated and Loaded Files

View file

@ -1,7 +1,7 @@
import { defineConfig } from "eslint/config";
import obsidianmd from "eslint-plugin-obsidianmd";
import codexPanelEslintPlugin from "./scripts/lint/eslint-plugin-codex-panel.mjs";
import tseslint from "typescript-eslint";
import codexPanelEslintPlugin from "./scripts/lint/eslint-plugin-codex-panel.mjs";
const typeScriptFiles = ["src/**/*.{ts,tsx}", "tests/**/*.{ts,tsx}"];
const nodeJavaScriptFiles = ["*.mjs", "scripts/**/*.mjs"];

View file

@ -19,8 +19,8 @@
"build:styles": "node scripts/build-styles.mjs",
"check": "node scripts/check.mjs",
"check:ci": "node scripts/check.mjs --ci",
"format": "biome format --write --no-errors-on-unmatched",
"format:check": "biome format --no-errors-on-unmatched",
"format": "biome check --write --linter-enabled=false --no-errors-on-unmatched",
"format:check": "biome check --linter-enabled=false --no-errors-on-unmatched",
"generate:app-server-types": "node scripts/generate-app-server-types.mjs",
"lint": "node scripts/check.mjs --lint",
"lint:ci": "node scripts/check.mjs --ci --lint",

View file

@ -1,5 +1,5 @@
import { readFile } from "node:fs/promises";
import { spawnSync } from "node:child_process";
import { readFile } from "node:fs/promises";
const args = new Set(process.argv.slice(2));
const asJson = args.has("--json");

View file

@ -1,3 +1,4 @@
import type { HookItem, ModelMetadata, SkillMetadata } from "../domain/catalog/metadata";
import type { AppServerClient } from "./connection/client";
import {
appServerHookOperationFromHookItem,
@ -6,7 +7,6 @@ import {
modelMetadataFromCatalogModels,
skillMetadataFromCatalogSkills,
} from "./protocol/catalog";
import type { HookItem, ModelMetadata, SkillMetadata } from "../domain/catalog/metadata";
export interface HookData {
hooks: HookItem[];

View file

@ -1,16 +1,23 @@
import type { InitializeResponse } from "../../generated/app-server/InitializeResponse";
import { CLIENT_VERSION } from "../../constants";
import type { CodexInput } from "../../domain/chat/input";
import type { RuntimeServiceTierRequest, RuntimeSettingsPatch } from "../../domain/runtime/thread-settings";
import type { ThreadGoalUpdate } from "../../domain/threads/goal";
import type { CollaborationMode } from "../../generated/app-server/CollaborationMode";
import type { RequestId } from "../../generated/app-server/RequestId";
import type { InitializeResponse } from "../../generated/app-server/InitializeResponse";
import type { ReasoningEffort } from "../../generated/app-server/ReasoningEffort";
import type { RequestId } from "../../generated/app-server/RequestId";
import type { ServerNotification } from "../../generated/app-server/ServerNotification";
import type { ServerRequest } from "../../generated/app-server/ServerRequest";
import type { JsonValue } from "../../generated/app-server/serde_json/JsonValue";
import type { ApprovalsReviewer } from "../../generated/app-server/v2/ApprovalsReviewer";
import type { AppsListParams } from "../../generated/app-server/v2/AppsListParams";
import type { AppsListResponse } from "../../generated/app-server/v2/AppsListResponse";
import type { CollaborationModeListResponse } from "../../generated/app-server/v2/CollaborationModeListResponse";
import type { ConfigReadResponse } from "../../generated/app-server/v2/ConfigReadResponse";
import type { ConfigWriteResponse } from "../../generated/app-server/v2/ConfigWriteResponse";
import type { FsReadFileResponse } from "../../generated/app-server/v2/FsReadFileResponse";
import type { GetAccountRateLimitsResponse } from "../../generated/app-server/v2/GetAccountRateLimitsResponse";
import type { HooksListResponse } from "../../generated/app-server/v2/HooksListResponse";
import type { CollaborationModeListResponse } from "../../generated/app-server/v2/CollaborationModeListResponse";
import type { ListMcpServerStatusParams } from "../../generated/app-server/v2/ListMcpServerStatusParams";
import type { ListMcpServerStatusResponse } from "../../generated/app-server/v2/ListMcpServerStatusResponse";
import type { ModelListResponse } from "../../generated/app-server/v2/ModelListResponse";
@ -20,7 +27,9 @@ import type { PluginInstalledResponse } from "../../generated/app-server/v2/Plug
import type { PluginReadParams } from "../../generated/app-server/v2/PluginReadParams";
import type { PluginReadResponse } from "../../generated/app-server/v2/PluginReadResponse";
import type { SkillsListResponse } from "../../generated/app-server/v2/SkillsListResponse";
import type { SortDirection } from "../../generated/app-server/v2/SortDirection";
import type { ThreadArchiveResponse } from "../../generated/app-server/v2/ThreadArchiveResponse";
import type { ThreadCompactStartResponse } from "../../generated/app-server/v2/ThreadCompactStartResponse";
import type { ThreadDeleteResponse } from "../../generated/app-server/v2/ThreadDeleteResponse";
import type { ThreadForkResponse } from "../../generated/app-server/v2/ThreadForkResponse";
import type { ThreadGoalClearResponse } from "../../generated/app-server/v2/ThreadGoalClearResponse";
@ -33,30 +42,21 @@ import type { ThreadResumeResponse } from "../../generated/app-server/v2/ThreadR
import type { ThreadRollbackResponse } from "../../generated/app-server/v2/ThreadRollbackResponse";
import type { ThreadSetNameResponse } from "../../generated/app-server/v2/ThreadSetNameResponse";
import type { ThreadSettingsUpdateResponse } from "../../generated/app-server/v2/ThreadSettingsUpdateResponse";
import type { ThreadCompactStartResponse } from "../../generated/app-server/v2/ThreadCompactStartResponse";
import type { SortDirection } from "../../generated/app-server/v2/SortDirection";
import type { ThreadStartResponse } from "../../generated/app-server/v2/ThreadStartResponse";
import type { ThreadTurnsListResponse } from "../../generated/app-server/v2/ThreadTurnsListResponse";
import type { ThreadUnarchiveResponse } from "../../generated/app-server/v2/ThreadUnarchiveResponse";
import type { TurnItemsView } from "../../generated/app-server/v2/TurnItemsView";
import type { TurnInterruptResponse } from "../../generated/app-server/v2/TurnInterruptResponse";
import type { TurnItemsView } from "../../generated/app-server/v2/TurnItemsView";
import type { TurnStartResponse } from "../../generated/app-server/v2/TurnStartResponse";
import type { TurnSteerResponse } from "../../generated/app-server/v2/TurnSteerResponse";
import type { UserInput } from "../../generated/app-server/v2/UserInput";
import { CLIENT_VERSION } from "../../constants";
import { JsonRpcClient } from "./json-rpc-client";
import { StdioAppServerTransport, type AppServerTransport, type AppServerTransportHandlers } from "./transport";
import type { ClientRequestMethod, ClientRequestParams, RpcOutboundMessage } from "./rpc-messages";
import type { ServerNotification } from "../../generated/app-server/ServerNotification";
import type { ServerRequest } from "../../generated/app-server/ServerRequest";
import type { JsonValue } from "../../generated/app-server/serde_json/JsonValue";
import type { CodexInput } from "../../domain/chat/input";
import type { ThreadGoalUpdate } from "../../domain/threads/goal";
import type { RuntimeServiceTierRequest, RuntimeSettingsPatch } from "../../domain/runtime/thread-settings";
import type { AppServerHookOperation } from "../protocol/catalog";
import { additionalContextFromCodexInput, toAppServerUserInput } from "../protocol/request-input";
import { appServerThreadGoalUpdate } from "../protocol/thread-goal";
import { appServerRuntimeSettingsPatch } from "../protocol/thread-settings";
import { JsonRpcClient } from "./json-rpc-client";
import type { ClientRequestMethod, ClientRequestParams, RpcOutboundMessage } from "./rpc-messages";
import { type AppServerTransport, type AppServerTransportHandlers, StdioAppServerTransport } from "./transport";
const DEFAULT_REQUEST_TIMEOUT_MS = 120_000;

View file

@ -1,8 +1,8 @@
import type { ServerInitialization } from "../../domain/server/initialization";
import type { ServerNotification } from "../../generated/app-server/ServerNotification";
import type { ServerRequest } from "../../generated/app-server/ServerRequest";
import type { ServerInitialization } from "../../domain/server/initialization";
import { AppServerClient, type AppServerClientHandlers } from "./client";
import { appServerInitializationFromResponse } from "../protocol/initialization";
import { AppServerClient, type AppServerClientHandlers } from "./client";
export interface ConnectionManagerHandlers {
onNotification: (notification: ServerNotification) => void;

View file

@ -1,3 +1,4 @@
import type { RequestId } from "../../generated/app-server/RequestId";
import type {
ClientRequestMethod,
ClientRequestParams,
@ -5,9 +6,9 @@ import type {
RpcError,
RpcInboundMessage,
RpcOutboundMessage,
ServerNotification,
ServerRequest,
} from "./rpc-messages";
import type { ServerNotification, ServerRequest } from "./rpc-messages";
import type { RequestId } from "../../generated/app-server/RequestId";
const MAX_SUPPRESSED_ORPHAN_RESPONSES = 256;

View file

@ -1,4 +1,4 @@
import { spawn, type ChildProcessWithoutNullStreams } from "child_process";
import { type ChildProcessWithoutNullStreams, spawn } from "child_process";
import * as readline from "readline";
import type { RpcOutboundMessage } from "./rpc-messages";

View file

@ -1,6 +1,6 @@
import { normalizeReasoningEffort } from "../../domain/catalog/metadata";
import { approvalsReviewerOrNull, parseServiceTier } from "../../domain/runtime/policy";
import type { ReasoningSummary, RuntimeConfigSnapshot, Verbosity } from "../../domain/runtime/config";
import { approvalsReviewerOrNull, parseServiceTier } from "../../domain/runtime/policy";
interface ConfigLayerRecord {
name: { type: string; profile?: unknown; [key: string]: unknown };

View file

@ -1,4 +1,3 @@
import type { ServerRequest } from "../../generated/app-server/ServerRequest";
import type {
ApprovalAction,
ApprovalActionIntent,
@ -12,6 +11,7 @@ import type {
PendingMcpElicitationOption,
PendingUserInput,
} from "../../domain/pending-requests/model";
import type { ServerRequest } from "../../generated/app-server/ServerRequest";
import { pathRelativeToRoot } from "../../shared/path/file-paths";
import { jsonPreview } from "../../shared/text/preview";

View file

@ -1,10 +1,10 @@
import type { ThreadItem as GeneratedTurnItem } from "../../generated/app-server/v2/ThreadItem";
import {
conversationSummaryFromTranscriptEntries,
nonEmptyConversationSummaries,
type ThreadConversationSummary,
type ThreadTranscriptEntry,
} from "../../domain/threads/transcript";
import type { ThreadItem as GeneratedTurnItem } from "../../generated/app-server/v2/ThreadItem";
export type TurnItem = GeneratedTurnItem;

View file

@ -1,26 +1,25 @@
import { QueryClient, QueryObserver, type QueryObserverResult } from "@tanstack/query-core";
import type { AppServerClient } from "../connection/client";
import type { AppServerClientAccessOptions } from "../connection/client-access";
import { listModelMetadata } from "../catalog";
import { readRateLimitMetadataProbe, readSkillMetadataProbe } from "./metadata-probes";
import { runtimeConfigSnapshotFromAppServerConfig } from "../protocol/runtime-config";
import { listThreads } from "../threads";
import type { ModelMetadata } from "../../domain/catalog/metadata";
import type { ObservedDataListener, ObservedDataResult } from "../../domain/observed-data";
import { createServerDiagnostics, diagnosticProbeError, diagnosticProbeOk, diagnosticsWithProbe } from "../../domain/server/diagnostics";
import type { SharedServerMetadata } from "../../domain/server/metadata";
import type { Thread } from "../../domain/threads/model";
import { listModelMetadata } from "../catalog";
import type { AppServerClient } from "../connection/client";
import type { AppServerClientAccessOptions } from "../connection/client-access";
import { runtimeConfigSnapshotFromAppServerConfig } from "../protocol/runtime-config";
import { listThreads } from "../threads";
import {
type AppServerQueryContext,
activeThreadsQueryKey,
archivedThreadsQueryKey,
appServerMetadataQueryKey,
appServerModelsQueryKey,
appServerQueriesFilter,
appServerQueryContextIsComplete,
archivedThreadsQueryKey,
cloneAppServerQueryContext,
type AppServerQueryContext,
} from "./keys";
import { readRateLimitMetadataProbe, readSkillMetadataProbe } from "./metadata-probes";
import { cloneModelMetadata, cloneSharedServerMetadata, cloneThreads } from "./snapshots";
const THREAD_LIST_STALE_TIME_MS = 10_000;

View file

@ -1,9 +1,9 @@
import type { AppServerClient } from "../connection/client";
import { accountRateLimitsSummaryFromResponse, rateLimitSnapshotFromAccountRateLimitsResponse } from "../protocol/runtime-metrics";
import { listSkillCatalog } from "../catalog";
import { diagnosticProbeError, diagnosticProbeOk, type Diagnostics } from "../../domain/server/diagnostics";
import type { SkillMetadata } from "../../domain/catalog/metadata";
import type { RateLimitSnapshot } from "../../domain/runtime/metrics";
import { type Diagnostics, diagnosticProbeError, diagnosticProbeOk } from "../../domain/server/diagnostics";
import { listSkillCatalog } from "../catalog";
import type { AppServerClient } from "../connection/client";
import { accountRateLimitsSummaryFromResponse, rateLimitSnapshotFromAccountRateLimitsResponse } from "../protocol/runtime-metrics";
interface MetadataProbeResult<T, K extends keyof Diagnostics["probes"]> {
data: T;

View file

@ -4,10 +4,10 @@ import type { SharedServerMetadata } from "../../domain/server/metadata";
import type { Thread } from "../../domain/threads/model";
import type { AppServerQueryCache } from "./cache";
import {
type AppServerQueryContext,
appServerQueryContextMatches,
appServerQueryContextRawEquals,
cloneAppServerQueryContext,
type AppServerQueryContext,
} from "./keys";
export interface AppServerSharedQueriesOptions {

View file

@ -1,3 +1,4 @@
import type { ModelMetadataClient } from "../catalog";
import {
AppServerClient,
type AppServerClientHandlers,
@ -6,7 +7,6 @@ import {
} from "../connection/client";
import type { AppServerClientRequestPolicy } from "../connection/client-access";
import type { RequestId, ServerNotification } from "../connection/rpc-messages";
import type { ModelMetadataClient } from "../catalog";
import { lastAgentMessageTextFromTurnRecord, type TurnItem, type TurnRecord } from "../protocol/turn";
import { abortableOperation, throwIfSignalAborted } from "./abortable-operation";

View file

@ -1,9 +1,9 @@
import {
archivedThreadMarkdown,
archivedThreadTitle,
type ArchiveExportAdapter,
type ArchiveExportSettings,
type ArchiveThreadInput,
archivedThreadMarkdown,
archivedThreadTitle,
} from "../../domain/threads/archive-markdown";
import { shortThreadId } from "../../shared/id/thread-id";

View file

@ -1,7 +1,7 @@
import type { ArchiveExportAdapter, ArchiveExportSettings } from "../../domain/threads/archive-markdown";
import type { AppServerClient } from "../connection/client";
import { exportArchivedThreadMarkdown } from "./thread-archive-markdown";
import { readThreadForArchiveExport } from "../threads";
import { exportArchivedThreadMarkdown } from "./thread-archive-markdown";
export interface ArchiveThreadOptions {
settings: ArchiveExportSettings;

View file

@ -1,18 +1,18 @@
import {
runEphemeralStructuredTurn,
type EphemeralStructuredTurnClientFactory,
type StructuredTurnOutputSchema,
} from "./ephemeral-structured-turn";
import type { ModelMetadataClient } from "../catalog";
import { resolvedRuntimeOverrideForClient } from "./runtime-overrides";
import { conversationAssistantTextFromTurnRecord, type TurnRecord } from "../protocol/turn";
import type { ReasoningEffort } from "../../domain/catalog/metadata";
import {
THREAD_TITLE_MAX_CHARS,
type ThreadTitleContext,
threadTitleFromGeneratedText,
threadTitlePrompt,
type ThreadTitleContext,
} from "../../domain/threads/title-generation-model";
import type { ModelMetadataClient } from "../catalog";
import { conversationAssistantTextFromTurnRecord, type TurnRecord } from "../protocol/turn";
import {
type EphemeralStructuredTurnClientFactory,
runEphemeralStructuredTurn,
type StructuredTurnOutputSchema,
} from "./ephemeral-structured-turn";
import { resolvedRuntimeOverrideForClient } from "./runtime-overrides";
const THREAD_TITLE_SERVICE_NAME = "codex-panel-naming";
const THREAD_TITLE_TIMEOUT_MS = 60_000;

View file

@ -1,21 +1,21 @@
import type { AppServerClient } from "./connection/client";
import { appServerThreadGoalUserHistoryItem, threadGoalFromAppServerGoal } from "./protocol/thread-goal";
import { threadFromThreadRecord, threadsFromThreadRecords, type ThreadRecord } from "./protocol/thread";
import {
chronologicalConversationSummariesFromTurnRecords,
completedConversationSummariesFromTurnRecords,
transcriptEntriesFromTurnRecords,
} from "./protocol/turn";
import { normalizeReasoningEffort } from "../domain/catalog/metadata";
import type { ApprovalsReviewer, ServiceTier } from "../domain/runtime/policy";
import { parseServiceTier } from "../domain/runtime/policy";
import type { ArchiveThreadInput } from "../domain/threads/archive-markdown";
import type { ThreadActivationSnapshot } from "../domain/threads/activation";
import type { ArchiveThreadInput } from "../domain/threads/archive-markdown";
import type { ThreadGoal, ThreadGoalUpdate } from "../domain/threads/goal";
import type { HistoricalTurn } from "../domain/threads/history";
import type { Thread } from "../domain/threads/model";
import { REFERENCED_THREAD_TURN_LIMIT } from "../domain/threads/reference";
import type { ThreadConversationSummary } from "../domain/threads/transcript";
import type { AppServerClient } from "./connection/client";
import { type ThreadRecord, threadFromThreadRecord, threadsFromThreadRecords } from "./protocol/thread";
import { appServerThreadGoalUserHistoryItem, threadGoalFromAppServerGoal } from "./protocol/thread-goal";
import {
chronologicalConversationSummariesFromTurnRecords,
completedConversationSummariesFromTurnRecords,
transcriptEntriesFromTurnRecords,
} from "./protocol/turn";
const THREAD_LIST_PAGE_LIMIT = 100;

View file

@ -1,12 +1,12 @@
import type { SkillMetadata } from "../domain/catalog/metadata";
import {
type DiagnosticProbeResult,
diagnosticProbeError,
diagnosticProbeOk,
mcpServerStatusSummariesFromStatuses,
type DiagnosticProbeResult,
type McpServerDiagnostic,
type McpServerStatusSummary,
mcpServerStatusSummariesFromStatuses,
} from "../domain/server/diagnostics";
import type { SkillMetadata } from "../domain/catalog/metadata";
import type {
ToolInventoryApp,
ToolInventoryMarketplaceError,

View file

@ -1,7 +1,3 @@
import type { Thread } from "./model";
import { referencedThreadMetadataFromPrompt } from "./reference";
import { threadArchiveTitle } from "./title";
import type { ThreadTranscriptEntry } from "./transcript";
import {
isExternalFileHref,
isFilesystemAbsolutePath,
@ -10,6 +6,10 @@ import {
parseFileHref,
vaultRelativePath,
} from "../../shared/path/file-paths";
import type { Thread } from "./model";
import { referencedThreadMetadataFromPrompt } from "./reference";
import { threadArchiveTitle } from "./title";
import type { ThreadTranscriptEntry } from "./transcript";
interface ParsedMarkdownLink {
raw: string;

View file

@ -1,5 +1,5 @@
import type { ThreadConversationSummary } from "./transcript";
import { truncate } from "../../shared/text/preview";
import type { ThreadConversationSummary } from "./transcript";
const THREAD_TITLE_CONTEXT_MAX_CHARS = 4_000;
const DEFAULT_CONTEXT_PAGE_LIMIT = 20;

View file

@ -1,18 +1,18 @@
import type { AppServerClient } from "../../../../app-server/connection/client";
import { readRateLimitMetadataProbe } from "../../../../app-server/query/metadata-probes";
import { readToolInventory } from "../../../../app-server/tool-inventory";
import {
cloneServerDiagnostics,
diagnosticsWithToolInventory,
diagnosticsWithProbe,
type DiagnosticProbeMethod,
type Diagnostics,
diagnosticProbeError,
diagnosticProbeOk,
diagnosticsWithProbe,
diagnosticsWithToolInventory,
upsertMcpServerStatusDiagnostics,
type Diagnostics,
type DiagnosticProbeMethod,
} from "../../../../domain/server/diagnostics";
import { readToolInventory } from "../../../../app-server/tool-inventory";
import { readRateLimitMetadataProbe } from "../../../../app-server/query/metadata-probes";
import type { SharedServerMetadata } from "../../../../domain/server/metadata";
import { captureChatServerActionClientScope, type ChatServerActionHost } from "./host";
import { type ChatServerActionHost, captureChatServerActionClientScope } from "./host";
interface RefreshServerDiagnosticsOptions {
appServerMetadataSnapshot?: boolean;

View file

@ -1,17 +1,17 @@
import {
type RateLimitMetadataProbeResult,
readRateLimitMetadataProbe,
readSkillMetadataProbe,
type RateLimitMetadataProbeResult,
} from "../../../../app-server/query/metadata-probes";
import { isStaleAppServerSharedQueryContextError } from "../../../../app-server/query/shared-queries";
import {
cloneServerDiagnostics,
diagnosticsWithProbe,
upsertMcpServerDiagnostic,
type McpServerStartupStatus,
upsertMcpServerDiagnostic,
} from "../../../../domain/server/diagnostics";
import type { SharedServerMetadata } from "../../../../domain/server/metadata";
import { captureChatServerActionClientScope, type ChatServerActionHost } from "./host";
import { type ChatServerActionHost, captureChatServerActionClientScope } from "./host";
export type AppServerResourceEvent =
| { type: "skills-changed"; forceReload: boolean }

View file

@ -1,12 +1,12 @@
import { threadActivationSnapshotFromAppServerResponse } from "../../../../app-server/threads";
import type { Thread } from "../../../../domain/threads/model";
import type { ThreadCatalogEvent } from "../../../../workspace/thread-catalog";
import { threadActivationSnapshotFromAppServerResponse } from "../../../../app-server/threads";
import type { RuntimeSnapshot } from "../../domain/runtime/snapshot";
import { runtimeConfigOrDefault } from "../../domain/runtime/effective";
import { serviceTierRequestForThreadStart } from "../runtime/thread-settings-update";
import { resumedThreadAction } from "../../application/state/actions";
import { captureChatServerActionClientScope, type ChatServerActionHost } from "./host";
import type { ChatState } from "../../application/state/root-reducer";
import { runtimeConfigOrDefault } from "../../domain/runtime/effective";
import type { RuntimeSnapshot } from "../../domain/runtime/snapshot";
import { serviceTierRequestForThreadStart } from "../runtime/thread-settings-update";
import { type ChatServerActionHost, captureChatServerActionClientScope } from "./host";
interface StartedThreadSummary {
threadId: string;

View file

@ -4,31 +4,31 @@ import {
appServerMcpElicitationResponse,
appServerUserInputResponse,
} from "../../../../app-server/protocol/server-requests";
import type { ThreadConversationSummary } from "../../../../domain/threads/transcript";
import type { ThreadCatalogEvent } from "../../../../workspace/thread-catalog";
import type { AppServerResourceEvent } from "../actions/metadata";
import type { LocalIdSource } from "../../../../shared/id/local-id";
import { classifyAppServerLog } from "./app-server-logs";
import { activeTurnId } from "../../application/conversation/turn-state";
import type { ChatAction, ChatState } from "../../application/state/root-reducer";
import type { ChatStateStore } from "../../application/state/store";
import type { MessageStreamNoticeSection } from "../../domain/message-stream/items";
import { createStructuredSystemItem, createSystemItem } from "../../domain/message-stream/factories/system-items";
import {
contentForPendingMcpElicitation,
type ApprovalAction,
contentForPendingMcpElicitation,
type McpElicitationAction,
type PendingApproval,
type PendingMcpElicitation,
type PendingRequestId,
type PendingUserInput,
} from "../../../../domain/pending-requests/model";
import type { ThreadConversationSummary } from "../../../../domain/threads/transcript";
import type { LocalIdSource } from "../../../../shared/id/local-id";
import type { ThreadCatalogEvent } from "../../../../workspace/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";
import { createStructuredSystemItem, createSystemItem } from "../../domain/message-stream/factories/system-items";
import type { MessageStreamNoticeSection } from "../../domain/message-stream/items";
import {
createApprovalResultItem,
createMcpElicitationResultItem,
createUserInputResultItem,
} from "../../domain/pending-requests/result-items";
import { planChatNotification, type ChatNotificationEffect } from "./notification-plan";
import type { AppServerResourceEvent } from "../actions/metadata";
import { classifyAppServerLog } from "./app-server-logs";
import { type ChatNotificationEffect, planChatNotification } from "./notification-plan";
import { routeServerRequest } from "./routing";
function cannotSendApprovalResponseMessage(): string {

View file

@ -1,44 +1,43 @@
import { activeThreadSettingsAppliedAction } from "../../application/state/actions";
import { threadTokenUsageFromRuntimeUsage } from "../../../../domain/runtime/metrics";
import { threadFromAppServerRecord } from "../../../../app-server/threads";
import { completedConversationSummaryFromTurnRecord, type TurnItem } from "../../../../app-server/protocol/turn";
import type { ServerNotification } from "../../../../app-server/connection/rpc-messages";
import { completedConversationSummaryFromTurnRecord, type TurnItem } from "../../../../app-server/protocol/turn";
import { threadFromAppServerRecord } from "../../../../app-server/threads";
import { threadTokenUsageFromRuntimeUsage } from "../../../../domain/runtime/metrics";
import { normalizeExplicitThreadName } from "../../../../domain/threads/model";
import type { ThreadConversationSummary } from "../../../../domain/threads/transcript";
import type { ThreadCatalogEvent } from "../../../../workspace/thread-catalog";
import { jsonPreview } from "../../../../shared/text/preview";
import type { ThreadCatalogEvent } from "../../../../workspace/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";
import type { ChatAction, ChatState } from "../../application/state/root-reducer";
import { completeReasoningItems, upsertMessageStreamItemById } from "../../domain/message-stream/updates";
import { reconcileCompletedTurnItems } from "../../domain/message-stream/completed-turn-reconciliation";
import { goalChangeItem } from "../../domain/message-stream/factories/goal-items";
import {
STREAMED_COMMAND_RUNNING_TEXT,
STREAMED_FILE_CHANGE_IN_PROGRESS_TEXT,
STREAMED_MCP_PROGRESS_LABEL,
} from "../../domain/message-stream/factories/streaming-items";
import { createSystemItem } from "../../domain/message-stream/factories/system-items";
import type { MessageStreamItem, MessageStreamItemKind } from "../../domain/message-stream/items";
import { attachHookRunsToTurn, completeReasoningItems, upsertMessageStreamItemById } from "../../domain/message-stream/updates";
import type { AppServerResourceEvent } from "../actions/metadata";
import {
type AppServerFileChange,
normalizeFileChanges,
streamingFileChangeMessageStreamItem,
} from "../mappers/message-stream/file-changes";
import { hookRunMessageStreamItem } from "../mappers/message-stream/hook-run-items";
import { createAutoReviewResultItem, createReviewResultItem } from "../mappers/message-stream/review-result-items";
import { taskProgressMessageStreamItem } from "../mappers/message-stream/task-progress";
import {
messageStreamItemFromTurnItem,
messageStreamItemsFromTurns,
shouldSuppressLifecycleItem,
} from "../mappers/message-stream/turn-items";
import {
normalizeFileChanges,
streamingFileChangeMessageStreamItem,
type AppServerFileChange,
} from "../mappers/message-stream/file-changes";
import { taskProgressMessageStreamItem } from "../mappers/message-stream/task-progress";
import type { MessageStreamItem, MessageStreamItemKind } from "../../domain/message-stream/items";
import { goalChangeItem } from "../../domain/message-stream/factories/goal-items";
import { hookRunMessageStreamItem } from "../mappers/message-stream/hook-run-items";
import { createAutoReviewResultItem, createReviewResultItem } from "../mappers/message-stream/review-result-items";
import { createSystemItem } from "../../domain/message-stream/factories/system-items";
import {
STREAMED_COMMAND_RUNNING_TEXT,
STREAMED_FILE_CHANGE_IN_PROGRESS_TEXT,
STREAMED_MCP_PROGRESS_LABEL,
} from "../../domain/message-stream/factories/streaming-items";
import { attachHookRunsToTurn } from "../../domain/message-stream/updates";
import { messageStreamItems } from "../../application/state/message-stream";
import { reconcileCompletedTurnItems } from "../../domain/message-stream/completed-turn-reconciliation";
import type { AppServerResourceEvent } from "../actions/metadata";
import {
routeServerNotification,
type DiagnosticStatusNotification,
type DiagnosticStatusNotificationMethod,
routeServerNotification,
type StreamUpdateNotification,
type StreamUpdateNotificationMethod,
type ThreadLifecycleNotification,

View file

@ -1,10 +1,10 @@
import type { AgentMessageStreamItem, AgentStateSummary, ExecutionState } from "../../../domain/message-stream/items";
import {
collabAgentStateExecutionState,
type ExecutionStateByStatus,
executionStateFromStatus,
RUNNING_EXECUTION_STATE,
type ExecutionStateByStatus,
} from "../../../domain/message-stream/execution-state";
import type { AgentMessageStreamItem, AgentStateSummary, ExecutionState } from "../../../domain/message-stream/items";
const STANDARD_TOOL_STATES: ExecutionStateByStatus = {
inProgress: RUNNING_EXECUTION_STATE,

View file

@ -1,5 +1,5 @@
import type { MessageStreamFileChange, MessageStreamItem } from "../../../domain/message-stream/items";
import { patchApplyExecutionState } from "../../../domain/message-stream/execution-state";
import type { MessageStreamFileChange, MessageStreamItem } from "../../../domain/message-stream/items";
export interface AppServerFileChange {
readonly path: string;

View file

@ -1,9 +1,9 @@
import type { ExecutionState, HookMessageStreamItem } from "../../../domain/message-stream/items";
import {
type ExecutionStateByStatus,
executionStateFromStatus,
RUNNING_EXECUTION_STATE,
type ExecutionStateByStatus,
} from "../../../domain/message-stream/execution-state";
import type { ExecutionState, HookMessageStreamItem } from "../../../domain/message-stream/items";
interface MessageStreamHookRun {
id: string;

View file

@ -1,11 +1,11 @@
import type { ExecutionState, MessageStreamAuditFact, MessageStreamItem } from "../../../domain/message-stream/items";
import { pathRelativeToRoot } from "../../../../../shared/path/file-paths";
import {
type ExecutionStateByStatus,
executionStateFromStatus,
RUNNING_EXECUTION_STATE,
type ExecutionStateByStatus,
} from "../../../domain/message-stream/execution-state";
import { permissionRows } from "../../../domain/message-stream/format/permission-rows";
import { pathRelativeToRoot } from "../../../../../shared/path/file-paths";
import type { ExecutionState, MessageStreamAuditFact, MessageStreamItem } from "../../../domain/message-stream/items";
const AUTO_REVIEW_STATES: ExecutionStateByStatus = {
inProgress: RUNNING_EXECUTION_STATE,

View file

@ -1,9 +1,9 @@
import type { ExecutionState, MessageStreamItem } from "../../../domain/message-stream/items";
import {
type ExecutionStateByStatus,
executionStateFromStatus,
RUNNING_EXECUTION_STATE,
type ExecutionStateByStatus,
} from "../../../domain/message-stream/execution-state";
import type { ExecutionState, MessageStreamItem } from "../../../domain/message-stream/items";
const TASK_STATES = {
pending: RUNNING_EXECUTION_STATE,

View file

@ -1,14 +1,8 @@
import type { CommandMessageStreamTarget, MessageStreamDiagnosticSection, MessageStreamItem } from "../../../domain/message-stream/items";
import type { MessageStreamItemProvenance } from "../../../domain/message-stream/provenance";
import type { HistoricalTurn } from "../../../../../domain/threads/history";
import type { TurnItem } from "../../../../../app-server/protocol/turn";
import { jsonPreview } from "../../../../../shared/text/preview";
import { referencedThreadMetadataFromPrompt } from "../../../../../domain/threads/reference";
import { turnUserItemText } from "../../../../../app-server/protocol/turn";
import { agentMessageStreamItem } from "./agent-items";
import { fileMentionsFromInput } from "../../../domain/message-stream/format/file-mentions";
import { normalizeProposedPlanMarkdown } from "../../../domain/message-stream/format/proposed-plan";
import { userMessageDisplayText } from "../../../domain/message-stream/format/user-message-text";
import type { HistoricalTurn } from "../../../../../domain/threads/history";
import { referencedThreadMetadataFromPrompt } from "../../../../../domain/threads/reference";
import { jsonPreview } from "../../../../../shared/text/preview";
import {
commandExecutionState,
dynamicToolCallExecutionState,
@ -17,6 +11,12 @@ import {
mcpToolCallExecutionState,
patchApplyExecutionState,
} from "../../../domain/message-stream/execution-state";
import { fileMentionsFromInput } from "../../../domain/message-stream/format/file-mentions";
import { normalizeProposedPlanMarkdown } from "../../../domain/message-stream/format/proposed-plan";
import { userMessageDisplayText } from "../../../domain/message-stream/format/user-message-text";
import type { CommandMessageStreamTarget, MessageStreamDiagnosticSection, MessageStreamItem } from "../../../domain/message-stream/items";
import type { MessageStreamItemProvenance } from "../../../domain/message-stream/provenance";
import { agentMessageStreamItem } from "./agent-items";
import { normalizeFileChanges } from "./file-changes";
type UserMessageItem = Extract<TurnItem, { type: "userMessage" }>;

View file

@ -1,12 +1,12 @@
import type { RuntimeConfigSnapshot } from "../../../../domain/runtime/config";
import {
applyRuntimeSettingsPatchValue,
runtimeCollaborationModeSettings,
type RuntimeServiceTierRequest,
type RuntimeSettingsPatch,
runtimeCollaborationModeSettings,
} from "../../../../domain/runtime/thread-settings";
import type { RuntimeConfigSnapshot } from "../../../../domain/runtime/config";
import { resolveRuntimeControls, type RuntimeControlsResolution } from "../../domain/runtime/resolution";
import type { PendingRuntimeIntent } from "../../domain/runtime/intent";
import { type RuntimeControlsResolution, resolveRuntimeControls } from "../../domain/runtime/resolution";
import type { RuntimeSnapshot } from "../../domain/runtime/snapshot";
type TurnCollaborationModeWarning = "missing-model";

View file

@ -1,11 +1,10 @@
import type { Thread } from "../../../../domain/threads/model";
import { prepareFuzzySearch, type SearchResult, sortSearchResults } from "obsidian";
import type { ModelMetadata, SkillMetadata } from "../../../../domain/catalog/metadata";
import { prepareFuzzySearch, sortSearchResults, type SearchResult } from "obsidian";
import { findModelMetadataByIdOrName, sortedModelMetadata } from "../../../../domain/catalog/metadata";
import { supportedEffortsForModelMetadata } from "../../../../domain/catalog/metadata";
import { SLASH_COMMANDS, slashCommandSubcommands, type SlashCommandName } from "./slash-commands";
import { findModelMetadataByIdOrName, sortedModelMetadata, supportedEffortsForModelMetadata } from "../../../../domain/catalog/metadata";
import type { Thread } from "../../../../domain/threads/model";
import { threadDisplayTitle } from "../../../../domain/threads/title";
import { shortThreadId } from "../../../../shared/id/thread-id";
import { SLASH_COMMANDS, type SlashCommandName, slashCommandSubcommands } from "./slash-commands";
export interface ComposerSuggestion {
display: string;

View file

@ -1,7 +1,6 @@
import { parseLinktext } from "obsidian";
import { codexTextInputWithMentions, type RequestAdditionalContext, type RequestMention } from "../../../../domain/chat/input";
import type { SkillMetadata } from "../../../../domain/catalog/metadata";
import { codexTextInputWithMentions, type RequestAdditionalContext, type RequestMention } from "../../../../domain/chat/input";
export interface ParsedWikiLink {
raw: string;

View file

@ -1,5 +1,5 @@
import { StaleConnectionError } from "../../../../app-server/connection/connection-manager";
import type { AppServerClient } from "../../../../app-server/connection/client";
import { StaleConnectionError } from "../../../../app-server/connection/connection-manager";
import { isStaleAppServerSharedQueryContextError } from "../../../../app-server/query/shared-queries";
import type { ServerInitialization } from "../../../../domain/server/initialization";
import type { ActiveConnectionWork, ConnectionWorkTracker } from "../../../../shared/lifecycle/connection-work";

View file

@ -1,8 +1,8 @@
import { serverIdentity, serverPlatform, type DiagnosticProbeMethod } from "../../../../domain/server/diagnostics";
import { CLIENT_VERSION } from "../../../../constants";
import type { ChatState } from "../state/root-reducer";
import type { DiagnosticProbeResult, Diagnostics } from "../../../../domain/server/diagnostics";
import { type DiagnosticProbeMethod, serverIdentity, serverPlatform } from "../../../../domain/server/diagnostics";
import type { ServerInitialization } from "../../../../domain/server/initialization";
import type { Diagnostics, DiagnosticProbeResult } from "../../../../domain/server/diagnostics";
import type { ChatState } from "../state/root-reducer";
const RUNTIME_CHECK_PROBE_METHODS: readonly DiagnosticProbeMethod[] = ["model/list", "account/rateLimits/read"];

View file

@ -1,11 +1,11 @@
import type { AppServerClient } from "../../../../app-server/connection/client";
import type { CodexInput } from "../../../../domain/chat/input";
import { submissionStateSnapshot } from "./submission-state";
import type { ChatStateStore } from "../state/store";
import { parseSlashCommand } from "../composer/suggestions";
import type { SlashCommandExecutionResult } from "./slash-command-execution";
import { slashCommandRequiresConnection, type SlashCommandName } from "../composer/slash-commands";
import type { ReferencedThreadMetadata } from "../../../../domain/threads/reference";
import { type SlashCommandName, slashCommandRequiresConnection } from "../composer/slash-commands";
import { parseSlashCommand } from "../composer/suggestions";
import type { ChatStateStore } from "../state/store";
import type { SlashCommandExecutionResult } from "./slash-command-execution";
import { submissionStateSnapshot } from "./submission-state";
const STATUS_INTERRUPT_REQUESTED = "Interrupt requested.";

View file

@ -1,15 +1,15 @@
import type { AppServerClient } from "../../../../app-server/connection/client";
import type { CodexInput } from "../../../../domain/chat/input";
import type { MessageStreamNoticeSection } from "../../domain/message-stream/items";
import type { LocalIdSource } from "../../../../shared/id/local-id";
import type { MessageStreamNoticeSection } from "../../domain/message-stream/items";
import type { ChatRuntimeSettingsActions } from "../runtime/settings-actions";
import type { ChatStateStore } from "../state/store";
import type { ThreadManagementActions } from "../threads/thread-management-actions";
import type { GoalActions } from "../threads/goal-actions";
import { submitComposer, type ComposerSubmitActions, type ComposerSubmitActionsHost } from "./composer-submit-actions";
import type { ThreadManagementActions } from "../threads/thread-management-actions";
import { type ComposerSubmitActions, type ComposerSubmitActionsHost, submitComposer } from "./composer-submit-actions";
import { implementPlan, type PlanImplementationHost } from "./plan-implementation";
import { executeSlashCommandWithState, type SlashCommandExecutorHost } from "./slash-command-executor";
import { createTurnSubmissionActions } from "./turn-submission-actions";
import { implementPlan, type PlanImplementationHost } from "./plan-implementation";
export interface ConversationTurnActionsContext {
vaultPath: string;

View file

@ -1,11 +1,11 @@
import type { PendingTurnStart } from "./turn-state";
import type { MessageStreamFileMention, MessageStreamItem, MessageStreamMessageItem } from "../../domain/message-stream/items";
import type { MessageStreamItemProvenance } from "../../domain/message-stream/provenance";
import type { CodexInput } from "../../../../domain/chat/input";
import { isLocalSteerMessageClientId } from "../../domain/local-message-ids";
import { fileMentionsFromInput } from "../../domain/message-stream/format/file-mentions";
import { userMessageDisplayText } from "../../domain/message-stream/format/user-message-text";
import type { MessageStreamFileMention, MessageStreamItem, MessageStreamMessageItem } from "../../domain/message-stream/items";
import type { MessageStreamItemProvenance } from "../../domain/message-stream/provenance";
import { attachHookRunsToTurn } from "../../domain/message-stream/updates";
import { isLocalSteerMessageClientId } from "../../domain/local-message-ids";
import type { CodexInput } from "../../../../domain/chat/input";
import type { PendingTurnStart } from "./turn-state";
interface LocalUserMessageParams {
id: string;

View file

@ -1,10 +1,10 @@
import type { AppServerClient } from "../../../../app-server/connection/client";
import { latestImplementablePlanTargetFromItems, type PlanImplementationTarget } from "../../domain/message-stream/selectors";
import type { ChatRuntimeState } from "../../domain/runtime/state";
import type { ChatStateStore } from "../state/store";
import { chatTurnBusy, type ChatTurnState } from "./turn-state";
import { type ChatMessageStreamState, messageStreamItems } from "../state/message-stream";
import type { ChatActiveThreadState, ChatState } from "../state/root-reducer";
import { messageStreamItems, type ChatMessageStreamState } from "../state/message-stream";
import type { ChatStateStore } from "../state/store";
import { type ChatTurnState, chatTurnBusy } from "./turn-state";
const IMPLEMENT_PLAN_PROMPT = "Please implement this plan.";

View file

@ -1,24 +1,24 @@
import type { CodexInput } from "../../../../domain/chat/input";
import type { ThreadGoal } from "../../../../domain/threads/goal";
import type { ReasoningEffort } from "../../../../domain/catalog/metadata";
import { normalizeReasoningEffort } from "../../../../domain/catalog/metadata";
import type { CodexInput } from "../../../../domain/chat/input";
import type { ThreadGoal } from "../../../../domain/threads/goal";
import type { Thread } from "../../../../domain/threads/model";
import { threadDisplayTitle } from "../../../../domain/threads/title";
import type { ReferencedThreadMetadata } from "../../../../domain/threads/reference";
import { threadDisplayTitle } from "../../../../domain/threads/title";
import { shortThreadId } from "../../../../shared/id/thread-id";
import type { ChatRuntimeSettingsActions } from "../runtime/settings-actions";
import type { GoalActions } from "../threads/goal-actions";
import type { ThreadManagementActions } from "../threads/thread-management-actions";
import type { MessageStreamAuditFact, MessageStreamNoticeSection } from "../../domain/message-stream/items";
import { modelOverrideMessage, reasoningEffortOverrideMessage } from "../../domain/runtime/labels";
import {
type SlashCommandName,
type SlashCommandSubcommandDefinition,
slashCommandDefinition,
slashCommandHelpSections,
slashCommandSubcommandDefinition,
slashCommandSubcommands,
type SlashCommandName,
type SlashCommandSubcommandDefinition,
} from "../composer/slash-commands";
import type { MessageStreamAuditFact, MessageStreamNoticeSection } from "../../domain/message-stream/items";
import { modelOverrideMessage, reasoningEffortOverrideMessage } from "../../domain/runtime/labels";
import type { ChatRuntimeSettingsActions } from "../runtime/settings-actions";
import type { GoalActions } from "../threads/goal-actions";
import type { ThreadManagementActions } from "../threads/thread-management-actions";
const DEFAULT_RUNTIME_SETTING_ALIASES = new Set(["default", "reset", "clear", "off"]);

View file

@ -1,22 +1,22 @@
import type { AppServerClient } from "../../../../app-server/connection/client";
import { codexTextInputWithAttachments, type CodexInput } from "../../../../domain/chat/input";
import { readReferencedThreadConversationSummaries } from "../../../../app-server/threads";
import { referencedThreadPromptBundle, REFERENCED_THREAD_TURN_LIMIT } from "../../../../domain/threads/reference";
import type { ReasoningEffort } from "../../../../domain/catalog/metadata";
import { findModelMetadataByIdOrName, supportedEffortsForModelMetadata } from "../../../../domain/catalog/metadata";
import { type CodexInput, codexTextInputWithAttachments } from "../../../../domain/chat/input";
import type { Thread } from "../../../../domain/threads/model";
import { REFERENCED_THREAD_TURN_LIMIT, referencedThreadPromptBundle } from "../../../../domain/threads/reference";
import { shortThreadId } from "../../../../shared/id/thread-id";
import { runtimeConfigOrDefault } from "../../domain/runtime/effective";
import { resolveRuntimeControls } from "../../domain/runtime/resolution";
import type { SlashCommandName } from "../composer/slash-commands";
import { runtimeSnapshotForChatState } from "../runtime/snapshot";
import type { ChatStateStore } from "../state/store";
import {
executeSlashCommand as runSlashCommand,
type SlashCommandExecutionPorts,
type SlashCommandExecutionResult,
type ThreadReferenceInput,
} from "./slash-command-execution";
import type { SlashCommandName } from "../composer/slash-commands";
import type { ReasoningEffort } from "../../../../domain/catalog/metadata";
import { findModelMetadataByIdOrName, supportedEffortsForModelMetadata } from "../../../../domain/catalog/metadata";
import type { ChatStateStore } from "../state/store";
import { runtimeConfigOrDefault } from "../../domain/runtime/effective";
import { resolveRuntimeControls } from "../../domain/runtime/resolution";
import { runtimeSnapshotForChatState } from "../runtime/snapshot";
import { submissionStateSnapshot } from "./submission-state";
export interface SlashCommandExecutorHost extends SlashCommandExecutionPorts {

View file

@ -1,8 +1,8 @@
import type { Thread } from "../../../../domain/threads/model";
import type { MessageStreamItem } from "../../domain/message-stream/items";
import { activeTurnId, chatTurnBusy, pendingTurnStart, type PendingTurnStart } from "./turn-state";
import type { ChatState } from "../state/root-reducer";
import { messageStreamItems } from "../state/message-stream";
import type { ChatState } from "../state/root-reducer";
import { activeTurnId, chatTurnBusy, type PendingTurnStart, pendingTurnStart } from "./turn-state";
export interface SubmissionStateSnapshot {
activeThreadId: string | null;

View file

@ -3,7 +3,6 @@ import type { CodexInput } from "../../../../domain/chat/input";
import type { ReferencedThreadMetadata } from "../../../../domain/threads/reference";
import type { LocalIdSource } from "../../../../shared/id/local-id";
import type { ChatStateStore } from "../state/store";
import { STATUS_TURN_RUNNING } from "./turn-state";
import {
acknowledgeOptimisticTurnStart,
cleanupFailedTurnStart,
@ -12,6 +11,7 @@ import {
shouldAcknowledgeTurnStart,
} from "./optimistic-turn-start";
import { submissionStateSnapshot } from "./submission-state";
import { STATUS_TURN_RUNNING } from "./turn-state";
const STATUS_STEERED_CURRENT_TURN = "Steered current turn.";

View file

@ -6,8 +6,8 @@ import type {
PendingRequestId,
PendingUserInput,
} from "../../../../domain/pending-requests/model";
import type { ChatRequestState } from "./state";
import type { ChatUiState } from "../state/ui-state";
import type { ChatRequestState } from "./state";
export interface PendingRequestBlockState {
approvals: readonly PendingApproval[];

View file

@ -1,8 +1,6 @@
import type { ChatStateStore } from "../state/store";
import { pendingRequestFocusSignature } from "../../domain/pending-requests/signatures";
import {
answersForPendingUserInput,
type ApprovalAction,
answersForPendingUserInput,
type McpElicitationAction,
type PendingApproval,
type PendingMcpElicitation,
@ -10,7 +8,9 @@ import {
type PendingUserInput,
} from "../../../../domain/pending-requests/model";
import { approvalDetailsDisclosureId } from "../../domain/pending-requests/disclosure-ids";
import { pendingRequestBlockStateFromChatState, type PendingRequestBlockActions, type PendingRequestBlockState } from "./block";
import { pendingRequestFocusSignature } from "../../domain/pending-requests/signatures";
import type { ChatStateStore } from "../state/store";
import { type PendingRequestBlockActions, type PendingRequestBlockState, pendingRequestBlockStateFromChatState } from "./block";
interface PendingRequestResponder {
resolveApproval: (requestId: PendingRequestId, action: ApprovalAction) => void;

View file

@ -1,11 +1,11 @@
import {
mcpElicitationDraftKey,
userInputDraftKey,
userInputOtherDraftKey,
type PendingApproval,
type PendingMcpElicitation,
type PendingRequestId,
type PendingUserInput,
userInputDraftKey,
userInputOtherDraftKey,
} from "../../../../domain/pending-requests/model";
import { patchObject } from "../state/patch";

View file

@ -1,18 +1,18 @@
import type { AppServerClient } from "../../../../app-server/connection/client";
import type { ReasoningEffort } from "../../../../domain/catalog/metadata";
import type { RuntimeConfigSnapshot } from "../../../../domain/runtime/config";
import type { ApprovalsReviewer } from "../../../../domain/runtime/policy";
import type { RuntimeSettingsPatch } from "../../../../domain/runtime/thread-settings";
import type { ReasoningEffort } from "../../../../domain/catalog/metadata";
import { autoReviewActive, fastModeActive, runtimeConfigOrDefault } from "../../domain/runtime/effective";
import {
pendingRuntimeSettingsPatch as buildPendingRuntimeSettingsPatch,
type PendingRuntimeSettingsPatch,
} from "../../app-server/runtime/thread-settings-update";
import { autoReviewActive, fastModeActive, runtimeConfigOrDefault } from "../../domain/runtime/effective";
import { type CollaborationModeSelection, nextCollaborationMode, type RequestedFastMode } from "../../domain/runtime/intent";
import { modelOverrideMessage, reasoningEffortOverrideMessage } from "../../domain/runtime/labels";
import type { RuntimeSnapshot } from "../../domain/runtime/snapshot";
import { nextCollaborationMode, type CollaborationModeSelection, type RequestedFastMode } from "../../domain/runtime/intent";
import type { ChatAction, ChatState } from "../state/root-reducer";
import type { ChatStateStore } from "../state/store";
import { modelOverrideMessage, reasoningEffortOverrideMessage } from "../../domain/runtime/labels";
interface RuntimeSettingsCommitResult {
ok: boolean;

View file

@ -1,8 +1,8 @@
import type { ChatState } from "../state/root-reducer";
import type { MessageStreamItem } from "../../domain/message-stream/items";
import type { RuntimeSnapshot } from "../../domain/runtime/snapshot";
import { activeThreadRuntimeState, pendingRuntimeIntentState } from "../../domain/runtime/state";
import { messageStreamItems } from "../state/message-stream";
import type { ChatState } from "../state/root-reducer";
interface RuntimeSnapshotInput {
runtimeConfig: ChatState["connection"]["runtimeConfig"];

View file

@ -1,11 +1,11 @@
import { normalizeReasoningEffort, type ReasoningEffort } from "../../../../domain/catalog/metadata";
import { parseServiceTier, type ServiceTier } from "../../../../domain/runtime/policy";
import type { ServerInitialization } from "../../../../domain/server/initialization";
import type { ThreadActivationSnapshot } from "../../../../domain/threads/activation";
import { upsertThread, type Thread } from "../../../../domain/threads/model";
import { parseServiceTier, type ServiceTier } from "../../../../domain/runtime/policy";
import { normalizeReasoningEffort, type ReasoningEffort } from "../../../../domain/catalog/metadata";
import type { ActiveThreadRuntimeState } from "../../domain/runtime/state";
import type { CollaborationModeSelection } from "../../domain/runtime/intent";
import { type Thread, upsertThread } from "../../../../domain/threads/model";
import type { MessageStreamItem } from "../../domain/message-stream/items";
import type { CollaborationModeSelection } from "../../domain/runtime/intent";
import type { ActiveThreadRuntimeState } from "../../domain/runtime/state";
import type { PendingTurnStart } from "../conversation/turn-state";
interface ResumedThreadActionParams {

View file

@ -1,13 +1,13 @@
import { completeReasoningItems, upsertMessageStreamItemById } from "../../domain/message-stream/updates";
import type { MessageStreamItem, MessageStreamMessageItem } from "../../domain/message-stream/items";
import { normalizeProposedPlanMarkdown } from "../../domain/message-stream/format/proposed-plan";
import { messageStreamSemanticClassifications } from "../../domain/message-stream/semantics/classify";
import { messageStreamIsTurnInitiator } from "../../domain/message-stream/semantics/predicates";
import {
streamedItemOutputMessageStreamItem,
streamedTextMessageStreamItem,
streamedToolOutputMessageStreamItem,
} from "../../domain/message-stream/factories/streaming-items";
import { normalizeProposedPlanMarkdown } from "../../domain/message-stream/format/proposed-plan";
import type { MessageStreamItem, MessageStreamMessageItem } from "../../domain/message-stream/items";
import { messageStreamSemanticClassifications } from "../../domain/message-stream/semantics/classify";
import { messageStreamIsTurnInitiator } from "../../domain/message-stream/semantics/predicates";
import { completeReasoningItems, upsertMessageStreamItemById } from "../../domain/message-stream/updates";
import { definedPatch, patchObject } from "./patch";
export interface ChatMessageStreamActiveSegment {

View file

@ -1,34 +1,47 @@
import type { ServerInitialization } from "../../../../domain/server/initialization";
import type { ReasoningEffort } from "../../../../domain/catalog/metadata";
import type { Thread } from "../../../../domain/threads/model";
import type { ModelMetadata, SkillMetadata } from "../../../../domain/catalog/metadata";
import type { ThreadGoal } from "../../../../domain/threads/goal";
import type { Diagnostics } from "../../../../domain/server/diagnostics";
import { createServerDiagnostics } from "../../../../domain/server/diagnostics";
import type { ModelMetadata, ReasoningEffort, SkillMetadata } from "../../../../domain/catalog/metadata";
import type { PendingRequestId } from "../../../../domain/pending-requests/model";
import type { RuntimeConfigSnapshot } from "../../../../domain/runtime/config";
import type { RateLimitSnapshot, ThreadTokenUsage } from "../../../../domain/runtime/metrics";
import type { ApprovalsReviewer } from "../../../../domain/runtime/policy";
import type { RuntimeSettingsPatch } from "../../../../domain/runtime/thread-settings";
import type { CollaborationModeSelection } from "../../domain/runtime/intent";
import type { Diagnostics } from "../../../../domain/server/diagnostics";
import { createServerDiagnostics } from "../../../../domain/server/diagnostics";
import type { ServerInitialization } from "../../../../domain/server/initialization";
import type { ThreadGoal } from "../../../../domain/threads/goal";
import type { Thread } from "../../../../domain/threads/model";
import type { MessageStreamItem } from "../../domain/message-stream/items";
import type { CollaborationModeSelection, RequestedFastMode } from "../../domain/runtime/intent";
import {
commitAppliedRuntimeSettingsPatchState,
type ChatRuntimeState,
clearRequestedApprovalsReviewerRuntimeState,
clearRequestedFastModeRuntimeState,
commitAppliedRuntimeSettingsPatchState,
initialActiveChatRuntimeState,
initialChatRuntimeState,
requestApprovalsReviewerRuntimeState,
requestFastModeRuntimeState,
requestModelRuntimeState,
requestReasoningEffortRuntimeState,
requestFastModeRuntimeState,
resetModelToConfigRuntimeState,
resetReasoningEffortToConfigRuntimeState,
setSelectedCollaborationModeRuntimeState,
type ChatRuntimeState,
} from "../../domain/runtime/state";
import type { RequestedFastMode } from "../../domain/runtime/intent";
import type { PendingRequestId } from "../../../../domain/pending-requests/model";
import type { ComposerSuggestion } from "../composer/suggestions";
import type { MessageStreamItem } from "../../domain/message-stream/items";
import {
type ChatTurnState,
initialChatTurnState,
type PendingTurnStart,
STATUS_TURN_RUNNING,
transitionChatTurnLifecycleState,
} from "../conversation/turn-state";
import {
type ChatRequestState,
initialChatRequestState,
isRequestAction,
type RequestAction,
reduceRequestSlice,
resolveChatRequest,
} from "../pending-requests/state";
import type {
ActiveThreadResumedAction,
ActiveThreadSettingsAppliedAction,
@ -42,42 +55,27 @@ import type {
TurnStartFailedAction,
} from "./actions";
import {
type ChatMessageStreamState,
initialChatMessageStreamState,
isMessageStreamAction,
type MessageStreamAction,
messageStreamItems,
messageStreamStartActiveSegment,
messageStreamWithActiveTurnItems,
messageStreamWithItems,
reduceMessageStreamSlice,
type ChatMessageStreamState,
type MessageStreamAction,
} from "./message-stream";
import { definedPatch, patchObject } from "./patch";
import {
initialChatRequestState,
isRequestAction,
reduceRequestSlice,
resolveChatRequest,
type ChatRequestState,
type RequestAction,
} from "../pending-requests/state";
import {
STATUS_TURN_RUNNING,
initialChatTurnState,
transitionChatTurnLifecycleState,
type ChatTurnState,
type PendingTurnStart,
} from "../conversation/turn-state";
import {
type ChatUiState,
clearAllRequestDisclosures,
clearResolvedRequestDisclosures,
initialUiState,
isUiAction,
maybeClearGoalObjectiveExpansion,
reduceUiSlice,
type ChatUiState,
type UiAction,
} from "./ui-state";
import { definedPatch, patchObject } from "./patch";
export type ChatConnectionPhase =
| { kind: "idle" }

View file

@ -1,6 +1,6 @@
import { cloneDisclosureUiState } from "./ui-state";
import type { ChatMessageStreamActiveSegment, ChatMessageStreamState } from "./message-stream";
import { chatReducer, createChatState, type ChatAction, type ChatState } from "./root-reducer";
import { type ChatAction, type ChatState, chatReducer, createChatState } from "./root-reducer";
import { cloneDisclosureUiState } from "./ui-state";
export interface ChatStateStore {
getState(): ChatState;

View file

@ -1,12 +1,12 @@
import { type PendingRequestId, pendingRequestDerivedKeyPrefix } from "../../../../domain/pending-requests/model";
import type { ThreadGoal } from "../../../../domain/threads/goal";
import { pendingRequestDerivedKeyPrefix, type PendingRequestId } from "../../../../domain/pending-requests/model";
import {
threadRenameGenerationStillActive,
transitionThreadRenameLifecycleState,
type ThreadRenameActiveState,
type ThreadRenameGeneratingState,
type ThreadRenameLifecycleEvent,
type ThreadRenameLifecycleState,
threadRenameGenerationStillActive,
transitionThreadRenameLifecycleState,
} from "../../../threads/rename-lifecycle";
import type { DisclosureSetAction } from "./actions";
import { patchObject } from "./patch";

View file

@ -1,5 +1,5 @@
import type { RestorationController } from "./restoration-controller";
import type { ChatStateStore } from "../state/store";
import type { RestorationController } from "./restoration-controller";
import { activeThreadId } from "./state-selectors";
export interface ActiveThreadIdentitySyncHost {

View file

@ -1,6 +1,6 @@
import type { Thread } from "../../../../domain/threads/model";
import type { ThreadConversationSummary } from "../../../../domain/threads/transcript";
import type { ThreadTitleContext } from "../../../../domain/threads/title-generation-model";
import type { ThreadConversationSummary } from "../../../../domain/threads/transcript";
import type { ThreadTitleService } from "../../../threads/thread-title-service";
import type { ChatState } from "../state/root-reducer";
import type { ChatStateStore } from "../state/store";

View file

@ -2,9 +2,9 @@ import type { AppServerClient } from "../../../../app-server/connection/client";
import { readThreadGoal, recordThreadGoalUserMessage, setThreadGoal } from "../../../../app-server/threads";
import type { ThreadGoal, ThreadGoalStatus, ThreadGoalUpdate } from "../../../../domain/threads/goal";
import type { LocalIdSource } from "../../../../shared/id/local-id";
import type { ChatStateStore } from "../state/store";
import type { GoalMessageStreamItem } from "../../domain/message-stream/items";
import { goalChangeItem } from "../../domain/message-stream/factories/goal-items";
import type { GoalMessageStreamItem } from "../../domain/message-stream/items";
import type { ChatStateStore } from "../state/store";
export interface ThreadGoalSyncHost {
stateStore: ChatStateStore;

View file

@ -1,8 +1,8 @@
import type { AppServerClient } from "../../../../app-server/connection/client";
import { readChatThreadHistoryPage, type ChatThreadHistoryPage } from "../../app-server/threads/projection";
import { type ChatThreadHistoryPage, readChatThreadHistoryPage } from "../../app-server/threads/projection";
import { messageStreamItems } from "../state/message-stream";
import type { ChatAction, ChatState } from "../state/root-reducer";
import type { ChatStateStore } from "../state/store";
import { messageStreamItems } from "../state/message-stream";
export interface HistoryControllerHost {
stateStore: ChatStateStore;

View file

@ -2,11 +2,11 @@ import type { AppServerClient } from "../../../../app-server/connection/client";
import { recoverRolloutTokenUsage } from "../../../../app-server/services/rollout-token-usage";
import type { ChatResumeWorkTracker } from "../lifecycle";
import type { ChatStateStore } from "../state/store";
import { createActiveThreadIdentitySync } from "./active-thread-identity-sync";
import type { GoalActions } from "./goal-actions";
import type { HistoryController } from "./history-controller";
import { createActiveThreadIdentitySync } from "./active-thread-identity-sync";
import { createResumeActions, type ResumeActions } from "./resume-actions";
import { RestorationController } from "./restoration-controller";
import { createResumeActions, type ResumeActions } from "./resume-actions";
export interface ThreadLifecyclePartsContext {
settingsRef: { readonly vaultPath: string };

View file

@ -3,10 +3,10 @@ import { threadRenameDraftTitle } from "../../../../domain/threads/title";
import type { ThreadTitleContext } from "../../../../domain/threads/title-generation-model";
import type { ThreadOperations } from "../../../threads/thread-operations";
import type { ThreadTitleService } from "../../../threads/thread-title-service";
import type { ChatAction, ChatState } from "../state/root-reducer";
import { renameGenerationStillActive, type ChatRenameGeneratingUiState, type ChatRenameUiState } from "../state/ui-state";
import type { ChatStateStore } from "../state/store";
import { messageStreamItems } from "../state/message-stream";
import type { ChatAction, ChatState } from "../state/root-reducer";
import type { ChatStateStore } from "../state/store";
import { type ChatRenameGeneratingUiState, type ChatRenameUiState, renameGenerationStillActive } from "../state/ui-state";
import { firstThreadTitleContextFromMessageStreamItems } from "./title-context";
interface RenameEditState {

View file

@ -1,8 +1,8 @@
import {
transitionRestoredThreadLifecycle,
type RestoredThreadLifecycleState,
type RestoredThreadPlaceholderState,
type RestoredThreadState,
transitionRestoredThreadLifecycle,
} from "../lifecycle";
const STATUS_THREAD_READY_TO_RESUME = "Thread ready to resume.";

View file

@ -1,11 +1,11 @@
import type { AppServerClient } from "../../../../app-server/connection/client";
import type { ThreadTokenUsage } from "../../../../domain/runtime/metrics";
import { resumeChatThread, type ChatThreadResumeSnapshot } from "../../app-server/threads/projection";
import { type ChatThreadResumeSnapshot, resumeChatThread } from "../../app-server/threads/projection";
import type { ActiveChatResume, ChatResumeWorkTracker } from "../lifecycle";
import { resumedThreadAction } from "../state/actions";
import type { ChatStateStore } from "../state/store";
import type { RestorationController } from "./restoration-controller";
import type { HistoryController } from "./history-controller";
import type { ChatResumeWorkTracker, ActiveChatResume } from "../lifecycle";
import type { RestorationController } from "./restoration-controller";
import { activeThreadId, canSwitchToThread, listedThreads, messageStreamItemsEmpty } from "./state-selectors";
export interface ResumeActionsHost {

View file

@ -1,6 +1,6 @@
import type { ActiveThreadIdentitySync } from "./active-thread-identity-sync";
import { chatTurnBusy } from "../conversation/turn-state";
import type { ChatStateStore } from "../state/store";
import type { ActiveThreadIdentitySync } from "./active-thread-identity-sync";
export interface StartNewThreadActions {
startNewThread(): Promise<void>;

View file

@ -1,7 +1,7 @@
import type { Thread } from "../../../../domain/threads/model";
import { chatTurnBusy } from "../conversation/turn-state";
import type { ChatState } from "../state/root-reducer";
import { messageStreamIsEmpty } from "../state/message-stream";
import type { ChatState } from "../state/root-reducer";
export function activeThreadId(state: ChatState): string | null {
return state.activeThread.id;

View file

@ -5,9 +5,9 @@ import type { ThreadCatalogEvent } from "../../../../workspace/thread-catalog";
import type { ThreadOperations } from "../../../threads/thread-operations";
import { messageStreamItemsFromTurns } from "../../app-server/mappers/message-stream/turn-items";
import { activeThreadRuntimeState } from "../../domain/runtime/state";
import { chatTurnBusy } from "../conversation/turn-state";
import { resumedThreadActionFromActiveRuntime } from "../state/actions";
import { messageStreamRollbackCandidate, messageStreamTurnsAfterTurnId } from "../state/message-stream";
import { chatTurnBusy } from "../conversation/turn-state";
import type { ChatAction, ChatState } from "../state/root-reducer";
import type { ChatStateStore } from "../state/store";

View file

@ -1,6 +1,6 @@
import { threadTitleContextPromptText, type ThreadTitleContext } from "../../../../domain/threads/title-generation-model";
import { isCompletedTurnOutcomeMessage } from "../../domain/message-stream/selectors";
import { type ThreadTitleContext, threadTitleContextPromptText } from "../../../../domain/threads/title-generation-model";
import type { MessageStreamItem, MessageStreamMessageItem } from "../../domain/message-stream/items";
import { isCompletedTurnOutcomeMessage } from "../../domain/message-stream/selectors";
export function threadTitleContextFromMessageStreamItems(turnId: string, items: readonly MessageStreamItem[]): ThreadTitleContext | null {
const turnItems = items.filter((item) => item.turnId === turnId);

View file

@ -1,5 +1,5 @@
import type { MessageStreamItem, MessageStreamItemKind } from "../items";
import { RUNNING_EXECUTION_STATE } from "../execution-state";
import type { MessageStreamItem, MessageStreamItemKind } from "../items";
export const STREAMED_COMMAND_RUNNING_TEXT = "Command running";
export const STREAMED_FILE_CHANGE_IN_PROGRESS_TEXT = "File change inProgress";

View file

@ -1,5 +1,5 @@
import type { MessageStreamItem } from "../items";
import { isLocalSteerMessageClientId } from "../../local-message-ids";
import type { MessageStreamItem } from "../items";
import type {
MessageStreamLifecycle,
MessageStreamMeaning,

View file

@ -1,6 +1,6 @@
import type { MessageStreamFileChange, MessageStreamItem } from "./items";
import { messageStreamSemanticClassifications } from "./semantics/classify";
import { messageStreamIsTurnInitiator } from "./semantics/predicates";
import type { MessageStreamFileChange, MessageStreamItem } from "./items";
export function upsertMessageStreamItemById(items: readonly MessageStreamItem[], next: MessageStreamItem): MessageStreamItem[] {
const index = items.findIndex((item) => item.id === next.id);

View file

@ -1,4 +1,4 @@
import { pendingRequestDerivedKeyPrefix, type PendingRequestId } from "../../../../domain/pending-requests/model";
import { type PendingRequestId, pendingRequestDerivedKeyPrefix } from "../../../../domain/pending-requests/model";
export function approvalDetailsDisclosureId(requestId: PendingRequestId): string {
return `${pendingRequestDerivedKeyPrefix(requestId)}details`;

View file

@ -1,6 +1,6 @@
import {
approvalActionKind,
type ApprovalAction,
approvalActionKind,
type McpElicitationAction,
type McpElicitationContentValue,
type PendingApproval,

View file

@ -1,5 +1,5 @@
import type { PendingApproval, PendingMcpElicitation, PendingUserInput } from "../../../../domain/pending-requests/model";
import { hasPendingRequests, pendingRequestCountsFromQueues } from "../../../../domain/pending-requests/aggregate";
import type { PendingApproval, PendingMcpElicitation, PendingUserInput } from "../../../../domain/pending-requests/model";
export function pendingRequestsSignature(
approvals: readonly PendingApproval[],

View file

@ -1,7 +1,7 @@
import { cloneRuntimeConfigSnapshot, emptyRuntimeConfigSnapshot, type RuntimeConfigSnapshot } from "../../../../domain/runtime/config";
import type { ReasoningEffort } from "../../../../domain/catalog/metadata";
import type { RuntimeSnapshot } from "./snapshot";
import { cloneRuntimeConfigSnapshot, emptyRuntimeConfigSnapshot, type RuntimeConfigSnapshot } from "../../../../domain/runtime/config";
import { resolveRuntimeControls } from "./resolution";
import type { RuntimeSnapshot } from "./snapshot";
export function runtimeConfigOrDefault(runtimeConfig: RuntimeConfigSnapshot | null): RuntimeConfigSnapshot {
return runtimeConfig ? cloneRuntimeConfigSnapshot(runtimeConfig) : emptyRuntimeConfigSnapshot();

View file

@ -1,5 +1,5 @@
import { findModelMetadataByIdOrName, supportedEffortsForModelMetadata, type ModelMetadata } from "../../../../domain/catalog/metadata";
import type { ReasoningEffort } from "../../../../domain/catalog/metadata";
import { findModelMetadataByIdOrName, type ModelMetadata, supportedEffortsForModelMetadata } from "../../../../domain/catalog/metadata";
import type { RuntimeConfigSnapshot } from "../../../../domain/runtime/config";
import type { ApprovalsReviewer, ServiceTier } from "../../../../domain/runtime/policy";
import { effectiveCollaborationMode, type PendingRuntimeIntent, type RequestedFastMode } from "./intent";

View file

@ -1,14 +1,14 @@
import { parseServiceTier, type ApprovalsReviewer, type ServiceTier } from "../../../../domain/runtime/policy";
import type { RuntimeSettingsPatch } from "../../../../domain/runtime/thread-settings";
import { normalizeReasoningEffort, type ReasoningEffort } from "../../../../domain/catalog/metadata";
import { type ApprovalsReviewer, parseServiceTier, type ServiceTier } from "../../../../domain/runtime/policy";
import type { RuntimeSettingsPatch } from "../../../../domain/runtime/thread-settings";
import {
resetRuntimeIntentToConfig,
setRuntimeIntentValue,
unchangedRuntimeIntent,
type ActiveCollaborationMode,
type CollaborationModeSelection,
type PendingRuntimeIntent,
type RequestedFastMode,
resetRuntimeIntentToConfig,
setRuntimeIntentValue,
unchangedRuntimeIntent,
} from "./intent";
export interface ChatRuntimeState {

View file

@ -3,23 +3,23 @@ import { Notice } from "obsidian";
import type { AppServerClient } from "../../../app-server/connection/client";
import type { ConnectionManager } from "../../../app-server/connection/connection-manager";
import { isStaleAppServerSharedQueryContextError } from "../../../app-server/query/shared-queries";
import type { ConnectionWorkTracker } from "../../../shared/lifecycle/connection-work";
import type { LocalIdSource } from "../../../shared/id/local-id";
import type { ConnectionWorkTracker } from "../../../shared/lifecycle/connection-work";
import { type ChatServerDiagnosticsActions, createChatServerDiagnosticsActions } from "../app-server/actions/diagnostics";
import { type ChatServerMetadataActions, createChatServerMetadataActions } from "../app-server/actions/metadata";
import { type ChatServerThreadActions, createChatServerThreadActions } from "../app-server/actions/threads";
import { type ChatInboundHandler, createChatInboundHandler } from "../app-server/inbound/handler";
import {
type ChatConnectionController,
createChatConnectionController,
handleChatConnectionExit,
type ChatConnectionController,
} from "../application/connection/connection-controller";
import type { ChatViewDeferredTasks } from "../application/lifecycle";
import { runtimeSnapshotForChatState } from "../application/runtime/snapshot";
import type { ChatConnectionPhase } from "../application/state/root-reducer";
import type { ChatStateStore } from "../application/state/store";
import type { createThreadGoalSyncActions } from "../application/threads/goal-actions";
import type { AutoTitleCoordinator } from "../application/threads/auto-title-coordinator";
import { runtimeSnapshotForChatState } from "../application/runtime/snapshot";
import { createChatServerDiagnosticsActions, type ChatServerDiagnosticsActions } from "../app-server/actions/diagnostics";
import { createChatServerMetadataActions, type ChatServerMetadataActions } from "../app-server/actions/metadata";
import { createChatServerThreadActions, type ChatServerThreadActions } from "../app-server/actions/threads";
import { createChatInboundHandler, type ChatInboundHandler } from "../app-server/inbound/handler";
import type { createThreadGoalSyncActions } from "../application/threads/goal-actions";
import type { ChatPanelEnvironment } from "./runtime";
export type CurrentAppServerClient = () => AppServerClient | null;

View file

@ -1,31 +1,39 @@
import { Notice } from "obsidian";
import { ConnectionManager } from "../../../app-server/connection/connection-manager";
import type { AppServerClientAccess } from "../../../app-server/connection/client-access";
import type { ObservedDataResult } from "../../../domain/observed-data";
import { observedData } from "../../../domain/observed-data";
import { ConnectionManager } from "../../../app-server/connection/connection-manager";
import { isStaleAppServerSharedQueryContextError } from "../../../app-server/query/shared-queries";
import type { ModelMetadata } from "../../../domain/catalog/metadata";
import type { MessageStreamNoticeSection } from "../domain/message-stream/items";
import type { ObservedDataResult } from "../../../domain/observed-data";
import { observedData } from "../../../domain/observed-data";
import type { SharedServerMetadata } from "../../../domain/server/metadata";
import { normalizeExplicitThreadName, type Thread } from "../../../domain/threads/model";
import { createLocalIdSource, type LocalIdSource } from "../../../shared/id/local-id";
import type { ConnectionWorkTracker } from "../../../shared/lifecycle/connection-work";
import { createThreadOperations, type ThreadOperations } from "../../threads/thread-operations";
import { createThreadTitleService, type ThreadTitleService } from "../../threads/thread-title-service";
import { createPendingRequestActions, type PendingRequestActions } from "../application/pending-requests/pending-request-actions";
import {
createConversationTurnActions,
type ConversationTurnActions as ChatPanelConversationTurnActions,
} from "../application/conversation/composition";
import type { ChatServerDiagnosticsActions } from "../app-server/actions/diagnostics";
import type { ChatServerMetadataActions } from "../app-server/actions/metadata";
import type { ChatServerThreadActions } from "../app-server/actions/threads";
import type { ChatInboundHandler } from "../app-server/inbound/handler";
import { connectionDiagnosticSectionsModel } from "../application/connection/diagnostics-display";
import { type ChatReconnectActionsHost, reconnectPanel } from "../application/connection/reconnect-actions";
import { toolInventoryDiagnosticSections } from "../application/connection/tool-inventory-display";
import type { ComposerSubmitActions } from "../application/conversation/composer-submit-actions";
import { reconnectPanel, type ChatReconnectActionsHost } from "../application/connection/reconnect-actions";
import { runtimeSnapshotForChatState } from "../application/runtime/snapshot";
import { createChatRuntimeSettingsActions } from "../application/runtime/settings-actions";
import type { ChatAction, ChatConnectionPhase } from "../application/state/root-reducer";
import { messageStreamItems } from "../application/state/message-stream";
import type { ChatStateStore } from "../application/state/store";
import {
type ConversationTurnActions as ChatPanelConversationTurnActions,
createConversationTurnActions,
} from "../application/conversation/composition";
import type { ChatResumeWorkTracker, ChatViewDeferredTasks } from "../application/lifecycle";
import { createGoalActions, createThreadGoalSyncActions } from "../application/threads/goal-actions";
import { createAutoTitleCoordinator, type AutoTitleCoordinator } from "../application/threads/auto-title-coordinator";
import { HistoryController } from "../application/threads/history-controller";
import { createPendingRequestActions, type PendingRequestActions } from "../application/pending-requests/pending-request-actions";
import { createChatRuntimeSettingsActions } from "../application/runtime/settings-actions";
import { runtimeSnapshotForChatState } from "../application/runtime/snapshot";
import { messageStreamItems } from "../application/state/message-stream";
import type { ChatAction, ChatConnectionPhase } from "../application/state/root-reducer";
import type { ChatStateStore } from "../application/state/store";
import type { ActiveThreadIdentitySync } from "../application/threads/active-thread-identity-sync";
import { type AutoTitleCoordinator, createAutoTitleCoordinator } from "../application/threads/auto-title-coordinator";
import { createGoalActions, createThreadGoalSyncActions } from "../application/threads/goal-actions";
import { HistoryController } from "../application/threads/history-controller";
import { createThreadLifecycleParts } from "../application/threads/lifecycle-parts";
import {
activeThreadRenameTitleContext,
@ -37,37 +45,28 @@ import type { ResumeActions } from "../application/threads/resume-actions";
import { createSelectionActions } from "../application/threads/selection-actions";
import { createStartNewThreadActions } from "../application/threads/start-new-thread-actions";
import { createThreadManagementActions, type ThreadManagementActionsHost } from "../application/threads/thread-management-actions";
import type { ChatServerDiagnosticsActions } from "../app-server/actions/diagnostics";
import type { ChatServerMetadataActions } from "../app-server/actions/metadata";
import type { ChatServerThreadActions } from "../app-server/actions/threads";
import type { ChatInboundHandler } from "../app-server/inbound/handler";
import { threadTitleContextFromMessageStreamItems } from "../application/threads/title-context";
import { createStructuredSystemItem, createSystemItem } from "../domain/message-stream/factories/system-items";
import type { MessageStreamNoticeSection } from "../domain/message-stream/items";
import { currentModel, runtimeConfigOrDefault } from "../domain/runtime/effective";
import { collaborationModeLabel as formatCollaborationModeLabel } from "../domain/runtime/labels";
import type { RuntimeSnapshot } from "../domain/runtime/snapshot";
import { ChatComposerController } from "../panel/composer-controller";
import { chatPanelComposerProjection, type ChatPanelComposerSurface } from "../panel/surface/composer-projection";
import { createChatPanelGoalSurface, type ChatPanelGoalSurface } from "../panel/surface/goal-projection";
import { type ChatPanelComposerSurface, chatPanelComposerProjection } from "../panel/surface/composer-projection";
import { type ChatPanelGoalSurface, createChatPanelGoalSurface } from "../panel/surface/goal-projection";
import { MessageStreamPresenter } from "../panel/surface/message-stream-presenter";
import type { ChatMessageScrollController } from "../panel/surface/message-stream-scroll";
import type { ChatPanelToolbarSurface } from "../panel/surface/toolbar-projection";
import { createChatPanelToolbarActions, createToolbarPanelActions, type ToolbarPanelActions } from "../panel/toolbar-actions";
import type { ToolbarActions } from "../ui/toolbar";
import { currentModel, runtimeConfigOrDefault } from "../domain/runtime/effective";
import { threadTitleContextFromMessageStreamItems } from "../application/threads/title-context";
import { normalizeExplicitThreadName, type Thread } from "../../../domain/threads/model";
import type { SharedServerMetadata } from "../../../domain/server/metadata";
import type { ConnectionWorkTracker } from "../../../shared/lifecycle/connection-work";
import { collaborationModeLabel as formatCollaborationModeLabel } from "../domain/runtime/labels";
import { VaultNoteCandidateProvider } from "../panel/vault-note-candidate-provider";
import {
effortStatusLines as buildEffortStatusLines,
modelStatusLines as buildModelStatusLines,
statusSummaryLines as buildStatusSummaryLines,
} from "../presentation/runtime/status";
import { connectionDiagnosticSectionsModel } from "../application/connection/diagnostics-display";
import { toolInventoryDiagnosticSections } from "../application/connection/tool-inventory-display";
import { createStructuredSystemItem, createSystemItem } from "../domain/message-stream/factories/system-items";
import { createLocalIdSource, type LocalIdSource } from "../../../shared/id/local-id";
import type { RuntimeSnapshot } from "../domain/runtime/snapshot";
import type { ToolbarActions } from "../ui/toolbar";
import { type ChatPanelConnectionBundle, type CurrentAppServerClient, createConnectionBundle } from "./connection-bundle";
import type { ChatPanelEnvironment } from "./runtime";
import { createConnectionBundle, type ChatPanelConnectionBundle, type CurrentAppServerClient } from "./connection-bundle";
import { VaultNoteCandidateProvider } from "../panel/vault-note-candidate-provider";
export interface ChatPanelSessionGraph {
connection: {

View file

@ -1,19 +1,18 @@
import type { AppServerClient } from "../../../app-server/connection/client";
import { appServerQueryContextMatches, appServerQueryContextRawEquals, type AppServerQueryContext } from "../../../app-server/query/keys";
import { type AppServerQueryContext, appServerQueryContextMatches, appServerQueryContextRawEquals } from "../../../app-server/query/keys";
import { pendingRequestCountsFromQueues } from "../../../domain/pending-requests/aggregate";
import { threadMeaningfulTitle, threadWindowTitle } from "../../../domain/threads/title";
import { ConnectionWorkTracker } from "../../../shared/lifecycle/connection-work";
import { createChatViewDeferredTasks } from "./lifecycle";
import { ChatResumeWorkTracker, type ChatViewDeferredTasks, type RestoredThreadPlaceholderState } from "../application/lifecycle";
import { openPanelTurnLifecycle, parseRestoredThreadState, type ChatPanelSnapshot } from "../panel/snapshot";
import type { ChatState } from "../application/state/root-reducer";
import { pendingRequestCountsFromQueues } from "../../../domain/pending-requests/aggregate";
import { type ChatStateStore, createChatStateStore } from "../application/state/store";
import { renderChatPanelShell, unmountChatPanelShell } from "../panel/shell";
import { createChatStateStore, type ChatStateStore } from "../application/state/store";
import { createChatMessageScrollController, type ChatMessageScrollController } from "../panel/surface/message-stream-scroll";
import type { ChatSurfaceHandle } from "./surface-handle";
import { type ChatPanelSnapshot, openPanelTurnLifecycle, parseRestoredThreadState } from "../panel/snapshot";
import { type ChatMessageScrollController, createChatMessageScrollController } from "../panel/surface/message-stream-scroll";
import { createChatViewDeferredTasks } from "./lifecycle";
import type { ChatPanelEnvironment } from "./runtime";
import { createChatPanelSessionGraph, type ChatPanelSessionGraph } from "./session-graph";
import { type ChatPanelSessionGraph, createChatPanelSessionGraph } from "./session-graph";
import type { ChatSurfaceHandle } from "./surface-handle";
export class ChatPanelSession implements ChatSurfaceHandle {
private readonly stateStore: ChatStateStore = createChatStateStore();

View file

@ -1,23 +1,23 @@
import type { CodexInput } from "../../../domain/chat/input";
import { isComposerSendKey, type SendShortcut } from "../../../shared/ui/keyboard";
import { textareaCursorAtVisualBoundary } from "../../../shared/ui/textarea-caret";
import type { ChatAction, ChatState } from "../application/state/root-reducer";
import type { ChatStateStore } from "../application/state/store";
import type { ComposerShellProps } from "../ui/composer";
import { syncComposerHeight, type ComposerCallbacks } from "../ui/composer";
import type { ChatPanelComposerShellState } from "./shell-state";
import { composerBoundaryScrollDirection, type ComposerBoundaryScrollAction } from "../application/composer/boundary-scroll";
import { type ComposerBoundaryScrollAction, composerBoundaryScrollDirection } from "../application/composer/boundary-scroll";
import type { NoteCandidateProvider } from "../application/composer/note-context";
import {
activeComposerSuggestions,
applyComposerSuggestionInsertion,
type ComposerSuggestion,
composerSuggestionNavigationDirection,
composerSuggestionSignature,
nextComposerSuggestionIndex,
type ComposerSuggestion,
type NoteCandidate,
nextComposerSuggestionIndex,
} from "../application/composer/suggestions";
import { userInputWithWikiLinkMentionsAndSkills } from "../application/composer/wikilink-context";
import type { ChatAction, ChatState } from "../application/state/root-reducer";
import type { ChatStateStore } from "../application/state/store";
import type { ComposerShellProps } from "../ui/composer";
import { type ComposerCallbacks, syncComposerHeight } from "../ui/composer";
import type { ChatPanelComposerShellState } from "./shell-state";
import type { ChatPanelComposerProjection } from "./surface/composer-projection";
export interface ChatComposerControllerOptions {

View file

@ -1,21 +1,20 @@
import { batch, computed, type ReadonlySignal, type Signal, signal } from "@preact/signals";
import { createContext } from "preact";
import { useContext } from "preact/hooks";
import { batch, computed, signal, type ReadonlySignal, type Signal } from "@preact/signals";
import type { RuntimeSnapshot } from "../domain/runtime/snapshot";
import { messageItemsHaveThreadTurns, runtimeSnapshotForChatSlices } from "../application/runtime/snapshot";
import { implementPlanTargetFromState } from "../application/conversation/plan-implementation";
import { activeTurnId, chatTurnBusy } from "../application/conversation/turn-state";
import type { ChatState } from "../application/state/root-reducer";
import { messageItemsHaveThreadTurns, runtimeSnapshotForChatSlices } from "../application/runtime/snapshot";
import {
type MessageStreamRollbackCandidate,
messageStreamActiveItems,
messageStreamItems,
messageStreamRollbackCandidateFromItems,
messageStreamStableItems,
type MessageStreamRollbackCandidate,
} from "../application/state/message-stream";
import type { ChatState } from "../application/state/root-reducer";
import type { MessageStreamItem } from "../domain/message-stream/items";
import { forkCandidatesFromItems, type ForkCandidate, type PlanImplementationTarget } from "../domain/message-stream/selectors";
import { type ForkCandidate, forkCandidatesFromItems, type PlanImplementationTarget } from "../domain/message-stream/selectors";
import type { RuntimeSnapshot } from "../domain/runtime/snapshot";
export interface ChatPanelShellState {
connection: Signal<ChatState["connection"]>;

View file

@ -1,12 +1,12 @@
import type { ComponentChild as UiNode } from "preact";
import { renderUiRoot, unmountUiRoot } from "../../../shared/ui/ui-root";
import type { ChatStateStore } from "../application/state/store";
import { ChatPanelToolbar, type ChatPanelToolbarSurface } from "./surface/toolbar-projection";
import type { ToolbarActions } from "../ui/toolbar";
import { type ChatPanelShellState, ChatPanelShellStateContext, createChatPanelShellState, syncChatPanelShellState } from "./shell-state";
import { ChatPanelComposer, type ChatPanelComposerActions, type ChatPanelComposerRenderer } from "./surface/composer-projection";
import { ChatPanelGoal, type ChatPanelGoalSurface } from "./surface/goal-projection";
import { ChatPanelMessageStream, type ChatPanelMessageStreamPresenter } from "./surface/message-stream-presenter";
import { ChatPanelComposer, type ChatPanelComposerActions, type ChatPanelComposerRenderer } from "./surface/composer-projection";
import { ChatPanelShellStateContext, createChatPanelShellState, syncChatPanelShellState, type ChatPanelShellState } from "./shell-state";
import { ChatPanelToolbar, type ChatPanelToolbarSurface } from "./surface/toolbar-projection";
export interface ChatPanelShellParts {
toolbar: {

View file

@ -1,5 +1,5 @@
import type { ChatState } from "../application/state/root-reducer";
import type { RestoredThreadState } from "../application/lifecycle";
import type { ChatState } from "../application/state/root-reducer";
type OpenCodexPanelTurnLifecycle = { kind: "idle" } | { kind: "starting" } | { kind: "running"; turnId: string };

View file

@ -1,16 +1,15 @@
import type { ComponentChild as UiNode } from "preact";
import { h } from "preact";
import { runtimeConfigOrDefault } from "../../domain/runtime/effective";
import { resolveRuntimeControls } from "../../domain/runtime/resolution";
import { contextSummary } from "../../presentation/runtime/status";
import { compactReasoningEffortLabel } from "../../domain/runtime/labels";
import { sortedModelMetadata } from "../../../../domain/catalog/metadata";
import type { ReasoningEffort } from "../../../../domain/catalog/metadata";
import type { RuntimeSnapshot } from "../../domain/runtime/snapshot";
import { ComposerShell, type ComposerShellProps } from "../../ui/composer";
import { composerStateFromShellState, useChatPanelShellState, type ChatPanelComposerShellState } from "../shell-state";
import { sortedModelMetadata } from "../../../../domain/catalog/metadata";
import { explicitThreadName } from "../../../../domain/threads/model";
import { runtimeConfigOrDefault } from "../../domain/runtime/effective";
import { compactReasoningEffortLabel } from "../../domain/runtime/labels";
import { resolveRuntimeControls } from "../../domain/runtime/resolution";
import type { RuntimeSnapshot } from "../../domain/runtime/snapshot";
import { contextSummary } from "../../presentation/runtime/status";
import { ComposerShell, type ComposerShellProps } from "../../ui/composer";
import { type ChatPanelComposerShellState, composerStateFromShellState, useChatPanelShellState } from "../shell-state";
interface RestoredThreadTitleSnapshot {
threadId: string;

View file

@ -1,10 +1,10 @@
import type { GoalActions } from "../../application/threads/goal-actions";
import type { ComponentChild as UiNode } from "preact";
import { h } from "preact";
import type { SendShortcut } from "../../../../shared/ui/keyboard";
import type { GoalActions } from "../../application/threads/goal-actions";
import type { GoalPanelActions, GoalPanelDisplayState, GoalPanelEditorState, GoalPanelOptions } from "../../ui/goal";
import { GoalPanel } from "../../ui/goal";
import { goalStateFromShellState, useChatPanelShellState, type ChatPanelGoalShellState } from "../shell-state";
import { type ChatPanelGoalShellState, goalStateFromShellState, useChatPanelShellState } from "../shell-state";
interface ChatPanelGoalActions {
saveObjective: (objective: string, tokenBudget: number | null) => Promise<boolean>;

View file

@ -1,19 +1,19 @@
import type { App, Component } from "obsidian";
import type { ComponentChild as UiNode } from "preact";
import { h } from "preact";
import type { App, Component } from "obsidian";
import { copyTextWithNotice } from "../../../../shared/ui/clipboard";
import type { PendingRequestBlockActions } from "../../application/pending-requests/block";
import type { ChatAction } from "../../application/state/root-reducer";
import type { ChatStateStore } from "../../application/state/store";
import type { ChatTurnDiffViewState } from "../../domain/turn-diff";
import type { MessageStreamScrollControllerBinding } from "../../ui/message-stream/flow-scroll";
import { MarkdownMessageRenderer, renderStreamMarkdown } from "../../ui/message-stream/markdown-renderer";
import { MessageStreamViewport, type MessageStreamViewportState } from "../../ui/message-stream/stream-blocks";
import { messageStreamStateFromShellState, useChatPanelShellState, type ChatPanelMessageStreamShellState } from "../shell-state";
import type { PendingRequestBlockActions } from "../../application/pending-requests/block";
import type { ChatTurnDiffViewState } from "../../domain/turn-diff";
import { type ChatPanelMessageStreamShellState, messageStreamStateFromShellState, useChatPanelShellState } from "../shell-state";
import {
type ChatMessageStreamSurfaceContext,
createMessageStreamSurfaceContext,
messageStreamSurfaceProjectionFromState,
type ChatMessageStreamSurfaceContext,
} from "./message-stream-projection";
export interface ChatPanelMessageStreamPresenter {

View file

@ -1,15 +1,15 @@
import { type PendingRequestBlockActions, pendingRequestBlockStateFromChatState } from "../../application/pending-requests/block";
import type { MessageStreamRollbackCandidate } from "../../application/state/message-stream";
import type { ChatAction } from "../../application/state/root-reducer";
import type { ChatDisclosureBucket, ChatDisclosureUiState } from "../../application/state/ui-state";
import { messageStreamViewBlocks, type MessageStreamViewBlock } from "../../presentation/message-stream/view-model";
import { messageStreamSegmentsEmpty, type ForkCandidate, type PlanImplementationTarget } from "../../domain/message-stream/selectors";
import type { MessageStreamRollbackCandidate } from "../../application/state/message-stream";
import type { MessageStreamContext } from "../../ui/message-stream/context";
import type { ChatPanelMessageStreamShellState } from "../shell-state";
import { pendingRequestBlockSnapshotFromState, type PendingRequestBlockSnapshot } from "../../presentation/pending-requests/view-model";
import { pendingRequestBlockStateFromChatState, type PendingRequestBlockActions } from "../../application/pending-requests/block";
import { type ForkCandidate, messageStreamSegmentsEmpty, type PlanImplementationTarget } from "../../domain/message-stream/selectors";
import { pendingRequestsSignature } from "../../domain/pending-requests/signatures";
import type { ChatTurnDiffViewState } from "../../domain/turn-diff";
import type { MessageStreamTextActionTargets } from "../../presentation/message-stream/text-view";
import { pendingRequestsSignature } from "../../domain/pending-requests/signatures";
import { type MessageStreamViewBlock, messageStreamViewBlocks } from "../../presentation/message-stream/view-model";
import { type PendingRequestBlockSnapshot, pendingRequestBlockSnapshotFromState } from "../../presentation/pending-requests/view-model";
import type { MessageStreamContext } from "../../ui/message-stream/context";
import type { ChatPanelMessageStreamShellState } from "../shell-state";
interface ChatMessageStreamActions {
rollbackThread: (threadId: string) => void;

View file

@ -4,12 +4,12 @@ import { h } from "preact";
import { CLIENT_VERSION } from "../../../../constants";
import type { Thread } from "../../../../domain/threads/model";
import { threadRowCoreProjection } from "../../../threads/row-projection";
import { rateLimitSummary } from "../../presentation/runtime/status";
import { connectionDiagnosticSectionsModel } from "../../application/connection/diagnostics-display";
import { toolInventoryDiagnosticSections } from "../../application/connection/tool-inventory-display";
import type { RuntimeSnapshot } from "../../domain/runtime/snapshot";
import { toolbarStateFromShellState, useChatPanelShellState, type ChatPanelToolbarShellState } from "../shell-state";
import { rateLimitSummary } from "../../presentation/runtime/status";
import { Toolbar, type ToolbarActions, type ToolbarThreadRow, type ToolbarViewModel } from "../../ui/toolbar";
import { type ChatPanelToolbarShellState, toolbarStateFromShellState, useChatPanelShellState } from "../shell-state";
export interface ChatPanelToolbarSurface {
state: {

View file

@ -1,12 +1,12 @@
import type { ThreadManagementActions } from "../application/threads/thread-management-actions";
import { copyTextWithNotice } from "../../../shared/ui/clipboard";
import type { ChatConnectionController } from "../application/connection/connection-controller";
import type { ChatAction, ChatState } from "../application/state/root-reducer";
import type { ChatStateStore } from "../application/state/store";
import type { ChatConnectionController } from "../application/connection/connection-controller";
import type { GoalActions } from "../application/threads/goal-actions";
import type { ThreadRenameEditorActions } from "../application/threads/rename-editor-actions";
import type { SelectionActions } from "../application/threads/selection-actions";
import type { ThreadManagementActions } from "../application/threads/thread-management-actions";
import type { ToolbarActions } from "../ui/toolbar";
import { copyTextWithNotice } from "../../../shared/ui/clipboard";
export interface ToolbarPanelActionsHost {
stateStore: ChatStateStore;

View file

@ -1,7 +1,7 @@
import { shortThreadId } from "../../../../shared/id/thread-id";
import { pathRelativeToRoot } from "../../../../shared/path/file-paths";
import { truncate } from "../../../../shared/text/preview";
import { failedStatusLabel } from "../../domain/message-stream/execution-state";
import { pathRelativeToRoot } from "../../../../shared/path/file-paths";
import type {
AgentMessageStreamItem,
ApprovalResultMessageStreamItem,

View file

@ -1,5 +1,5 @@
import type { MessageStreamItem } from "../../domain/message-stream/items";
import { pathRelativeToRoot } from "../../../../shared/path/file-paths";
import type { MessageStreamItem } from "../../domain/message-stream/items";
import { messageStreamSemanticClassifications } from "../../domain/message-stream/semantics/classify";
import {
messageStreamIsAutoReviewDecision,

View file

@ -1,5 +1,4 @@
import { shortThreadId } from "../../../../shared/id/thread-id";
import { messageStreamReasoningIsActive } from "../../domain/message-stream/semantics/active-turn";
import type {
AgentRunSummary,
AgentRunSummaryAgent,
@ -8,6 +7,7 @@ import type {
ReasoningMessageStreamItem,
TaskProgressMessageStreamItem,
} from "../../domain/message-stream/items";
import { messageStreamReasoningIsActive } from "../../domain/message-stream/semantics/active-turn";
export type StatusChecklistItem = TaskProgressMessageStreamItem["steps"][number];

View file

@ -1,12 +1,12 @@
import type { MessageStreamSemanticClassification } from "../../domain/message-stream/semantics/types";
import type { AgentRunSummary, MessageStreamItem, TaskProgressMessageStreamItem } from "../../domain/message-stream/items";
import { messageStreamItemsEmpty } from "../../domain/message-stream/selectors";
import { activeTurnLiveItems, messageStreamItemsWithoutActiveTaskProgress } from "../../domain/message-stream/semantics/active-turn";
import { messageStreamLayoutBlocks, type MessageStreamItemAnnotations, type MessageStreamLayoutBlock } from "./layout";
import { detailView, type DetailView } from "./detail-view";
import { messageStreamTextView, type MessageStreamTextActionTargets, type MessageStreamTextView } from "./text-view";
import { agentRunSummaryView, messageStreamStatusView, type AgentRunSummaryView, type MessageStreamStatusView } from "./status-view";
import type { MessageStreamSemanticClassification } from "../../domain/message-stream/semantics/types";
import type { PendingRequestBlockSnapshot } from "../pending-requests/view-model";
import { type DetailView, detailView } from "./detail-view";
import { type MessageStreamItemAnnotations, type MessageStreamLayoutBlock, messageStreamLayoutBlocks } from "./layout";
import { type AgentRunSummaryView, agentRunSummaryView, type MessageStreamStatusView, messageStreamStatusView } from "./status-view";
import { type MessageStreamTextActionTargets, type MessageStreamTextView, messageStreamTextView } from "./text-view";
interface PendingRequestMessageStreamBlockInput {
signature: string;

View file

@ -1,14 +1,14 @@
import {
approvalActionKind,
defaultPendingApprovalOptions,
type ApprovalAction,
approvalActionKind,
type PendingRequestId as DomainPendingRequestId,
defaultPendingApprovalOptions,
mcpElicitationDraftKey,
mcpElicitationFieldDefaultDraft,
type PendingApproval,
type PendingMcpElicitation,
type PendingMcpElicitationField,
type PendingRequestId as DomainPendingRequestId,
type PendingUserInput,
mcpElicitationDraftKey,
mcpElicitationFieldDefaultDraft,
questionDefaultAnswer,
userInputDraftKey,
userInputOtherDraftKey,

View file

@ -2,9 +2,9 @@ import type { RuntimeConfigSnapshot } from "../../../../domain/runtime/config";
import type { RateLimitWindow, SpendControlLimitSnapshot, ThreadTokenUsage } from "../../../../domain/runtime/metrics";
import { jsonPreview } from "../../../../shared/text/preview";
import { currentServiceTier, runtimeConfigOrDefault } from "../../domain/runtime/effective";
import type { RuntimeSnapshot } from "../../domain/runtime/snapshot";
import { pendingRuntimeSettingLabel, serviceTierLabel as formatServiceTierLabel } from "../../domain/runtime/labels";
import { serviceTierLabel as formatServiceTierLabel, pendingRuntimeSettingLabel } from "../../domain/runtime/labels";
import { resolveRuntimeControls } from "../../domain/runtime/resolution";
import type { RuntimeSnapshot } from "../../domain/runtime/snapshot";
export interface ContextSummary {
label: string;

View file

@ -1,4 +1,4 @@
import type { ButtonHTMLAttributes, ComponentChild as UiNode, Ref } from "preact";
import type { ButtonHTMLAttributes, Ref, ComponentChild as UiNode } from "preact";
import { useLayoutEffect, useRef, useState } from "preact/hooks";
import { IconButton } from "../../../shared/ui/components";

View file

@ -2,9 +2,9 @@ import type { ComponentChild as UiNode } from "preact";
import { useEffect, useLayoutEffect, useRef, useState } from "preact/hooks";
import type { ThreadGoal, ThreadGoalStatus } from "../../../domain/threads/goal";
import { isComposerSendKey, type SendShortcut } from "../../../shared/ui/keyboard";
import { IconButton } from "../../../shared/ui/components";
import { disposeDomListeners, listenDomEvent } from "../../../shared/ui/dom-events";
import { isComposerSendKey, type SendShortcut } from "../../../shared/ui/keyboard";
import { syncTextareaHeight } from "../../../shared/ui/textarea-autogrow";
export interface GoalPanelActions {

Some files were not shown because too many files have changed in this diff Show more