From d6214bbdc1cb1d5273a4db5876eb92b114dae867 Mon Sep 17 00:00:00 2001 From: murashit Date: Mon, 22 Jun 2026 17:14:20 +0900 Subject: [PATCH] Move chat runtime labels into domain --- .../chat/application/conversation/slash-command-execution.ts | 2 +- src/features/chat/application/runtime/settings-actions.ts | 2 +- .../runtime/messages.ts => domain/runtime/labels.ts} | 2 +- src/features/chat/host/session-graph.ts | 2 +- src/features/chat/panel/surface/composer-projection.tsx | 2 +- src/features/chat/presentation/runtime/status.ts | 2 +- tests/runtime/override-commands.test.ts | 2 +- tests/runtime/runtime-settings.test.ts | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) rename src/features/chat/{presentation/runtime/messages.ts => domain/runtime/labels.ts} (93%) diff --git a/src/features/chat/application/conversation/slash-command-execution.ts b/src/features/chat/application/conversation/slash-command-execution.ts index 8ed5d0db..b8dc7517 100644 --- a/src/features/chat/application/conversation/slash-command-execution.ts +++ b/src/features/chat/application/conversation/slash-command-execution.ts @@ -18,7 +18,7 @@ import { type SlashCommandSubcommandDefinition, } from "../composer/slash-commands"; import type { MessageStreamAuditFact, MessageStreamNoticeSection } from "../../domain/message-stream/items"; -import { modelOverrideMessage, reasoningEffortOverrideMessage } from "../../presentation/runtime/messages"; +import { modelOverrideMessage, reasoningEffortOverrideMessage } from "../../domain/runtime/labels"; const DEFAULT_RUNTIME_SETTING_ALIASES = new Set(["default", "reset", "clear", "off"]); diff --git a/src/features/chat/application/runtime/settings-actions.ts b/src/features/chat/application/runtime/settings-actions.ts index 4991f682..f2f77d00 100644 --- a/src/features/chat/application/runtime/settings-actions.ts +++ b/src/features/chat/application/runtime/settings-actions.ts @@ -12,7 +12,7 @@ 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 "../../presentation/runtime/messages"; +import { modelOverrideMessage, reasoningEffortOverrideMessage } from "../../domain/runtime/labels"; interface ApplyPendingThreadSettingsResult { ok: boolean; diff --git a/src/features/chat/presentation/runtime/messages.ts b/src/features/chat/domain/runtime/labels.ts similarity index 93% rename from src/features/chat/presentation/runtime/messages.ts rename to src/features/chat/domain/runtime/labels.ts index e156e41d..eac3bf79 100644 --- a/src/features/chat/presentation/runtime/messages.ts +++ b/src/features/chat/domain/runtime/labels.ts @@ -1,5 +1,5 @@ import type { ReasoningEffort } from "../../../../domain/catalog/metadata"; -import type { CollaborationModeSelection } from "../../domain/runtime/intent"; +import type { CollaborationModeSelection } from "./intent"; export function compactReasoningEffortLabel(effort: ReasoningEffort | null): string { if (!effort) return "default"; diff --git a/src/features/chat/host/session-graph.ts b/src/features/chat/host/session-graph.ts index e922b18c..efe9c2bb 100644 --- a/src/features/chat/host/session-graph.ts +++ b/src/features/chat/host/session-graph.ts @@ -55,7 +55,7 @@ import { normalizeExplicitThreadName, type Thread } from "../../../domain/thread import type { SharedServerMetadata } from "../../../domain/server/metadata"; import type { ConnectionWorkTracker } from "../../../shared/lifecycle/connection-work"; import { archiveExportSettings } from "../../threads/archive-export-settings"; -import { collaborationModeLabel as formatCollaborationModeLabel } from "../presentation/runtime/messages"; +import { collaborationModeLabel as formatCollaborationModeLabel } from "../domain/runtime/labels"; import { effortStatusLines as buildEffortStatusLines, modelStatusLines as buildModelStatusLines, diff --git a/src/features/chat/panel/surface/composer-projection.tsx b/src/features/chat/panel/surface/composer-projection.tsx index 9ca4941a..cb605615 100644 --- a/src/features/chat/panel/surface/composer-projection.tsx +++ b/src/features/chat/panel/surface/composer-projection.tsx @@ -10,7 +10,7 @@ import { supportedReasoningEfforts, } from "../../domain/runtime/effective"; import { contextSummary } from "../../presentation/runtime/status"; -import { compactReasoningEffortLabel } from "../../presentation/runtime/messages"; +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"; diff --git a/src/features/chat/presentation/runtime/status.ts b/src/features/chat/presentation/runtime/status.ts index eb8f871c..61300e1f 100644 --- a/src/features/chat/presentation/runtime/status.ts +++ b/src/features/chat/presentation/runtime/status.ts @@ -9,7 +9,7 @@ import { supportedReasoningEfforts, } from "../../domain/runtime/effective"; import type { RuntimeSnapshot } from "../../domain/runtime/snapshot"; -import { pendingRuntimeSettingLabel, serviceTierLabel as formatServiceTierLabel } from "./messages"; +import { pendingRuntimeSettingLabel, serviceTierLabel as formatServiceTierLabel } from "../../domain/runtime/labels"; export interface ContextSummary { label: string; diff --git a/tests/runtime/override-commands.test.ts b/tests/runtime/override-commands.test.ts index 46800291..67240bb9 100644 --- a/tests/runtime/override-commands.test.ts +++ b/tests/runtime/override-commands.test.ts @@ -1,6 +1,6 @@ import { describe, expect, it } from "vitest"; -import { collaborationModeLabel } from "../../src/features/chat/presentation/runtime/messages"; +import { collaborationModeLabel } from "../../src/features/chat/domain/runtime/labels"; import { nextCollaborationMode } from "../../src/features/chat/domain/runtime/intent"; describe("runtime collaboration mode", () => { diff --git a/tests/runtime/runtime-settings.test.ts b/tests/runtime/runtime-settings.test.ts index 2f9760b6..d2cd9132 100644 --- a/tests/runtime/runtime-settings.test.ts +++ b/tests/runtime/runtime-settings.test.ts @@ -7,7 +7,7 @@ import { compactReasoningEffortLabel, modelOverrideMessage, reasoningEffortOverrideMessage, -} from "../../src/features/chat/presentation/runtime/messages"; +} from "../../src/features/chat/domain/runtime/labels"; import { autoReviewActive, currentModel,