mirror of
https://github.com/murashit/codex-panel.git
synced 2026-07-22 06:57:10 +00:00
Consolidate catalog metadata helpers
This commit is contained in:
parent
849f65f416
commit
cef0edf3a6
40 changed files with 72 additions and 73 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import type { AppServerClient } from "./client";
|
||||
import { panelHookItemsFromAppServerHooks, panelModelOptionsFromAppServerModels } from "./catalog-model";
|
||||
import type { PanelHookItem, PanelModelOption } from "../domain/catalog/model";
|
||||
import type { PanelHookItem, PanelModelOption } from "../domain/catalog/metadata";
|
||||
|
||||
export interface PanelHooksForCwd {
|
||||
hooks: PanelHookItem[];
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import type { HookMetadata } from "../generated/app-server/v2/HookMetadata";
|
|||
import type { Model } from "../generated/app-server/v2/Model";
|
||||
import type { SkillMetadata } from "../generated/app-server/v2/SkillMetadata";
|
||||
import type { AppServerHookOperation } from "./client";
|
||||
import type { PanelHookItem, PanelModelOption, PanelSkillOption } from "../domain/catalog/model";
|
||||
import type { PanelHookItem, PanelModelOption, PanelSkillOption } from "../domain/catalog/metadata";
|
||||
|
||||
function panelModelOptionFromAppServerModel(model: Model): PanelModelOption {
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import type { PanelModelOption } from "../domain/catalog/model";
|
||||
import { findModelOptionByIdOrName } from "../domain/catalog/model";
|
||||
import type { PanelModelOption } from "../domain/catalog/metadata";
|
||||
import { findModelOptionByIdOrName } from "../domain/catalog/metadata";
|
||||
import type { ReasoningEffort as AppServerReasoningEffort } from "../generated/app-server/ReasoningEffort";
|
||||
import { supportedEffortsForModelOption, type ReasoningEffort as DomainReasoningEffort } from "../domain/catalog/reasoning-effort";
|
||||
import { supportedEffortsForModelOption, type ReasoningEffort as DomainReasoningEffort } from "../domain/catalog/metadata";
|
||||
|
||||
export interface RuntimeOverrideSettings {
|
||||
model: string | null;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import type { AppServerDiagnostics } from "./compatibility";
|
|||
import type { ConfigReadResponse } from "../generated/app-server/v2/ConfigReadResponse";
|
||||
import type { RateLimitSnapshot } from "../generated/app-server/v2/RateLimitSnapshot";
|
||||
import type { PanelThread } from "../domain/threads/model";
|
||||
import type { PanelModelOption, PanelSkillOption } from "../domain/catalog/model";
|
||||
import type { PanelModelOption, PanelSkillOption } from "../domain/catalog/metadata";
|
||||
|
||||
export interface SharedAppServerMetadata {
|
||||
effectiveConfig: ConfigReadResponse | null;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import type { PanelThread } from "../domain/threads/model";
|
||||
import type { PanelModelOption } from "../domain/catalog/model";
|
||||
import type { PanelModelOption } from "../domain/catalog/metadata";
|
||||
import {
|
||||
applySharedAppServerMetadata,
|
||||
applySharedModels,
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import type { TurnStartResponse } from "../generated/app-server/v2/TurnStartResp
|
|||
import { panelModelOptionsFromAppServerModels } from "./catalog-model";
|
||||
import { namingPrompt, titleFromNamingTurn, type ThreadNamingContext } from "../domain/threads/naming";
|
||||
import { runtimeOverride, validatedRuntimeOverrideForModelOptions } from "./runtime-overrides";
|
||||
import type { PanelModelOption } from "../domain/catalog/model";
|
||||
import type { PanelModelOption } from "../domain/catalog/metadata";
|
||||
import {
|
||||
createStructuredTurnRunLifecycle,
|
||||
structuredTurnRunMatches,
|
||||
|
|
|
|||
|
|
@ -42,6 +42,27 @@ export interface PanelHookItem {
|
|||
trustStatus: PanelHookTrustStatus;
|
||||
}
|
||||
|
||||
export const REASONING_EFFORTS = ["none", "minimal", "low", "medium", "high", "xhigh"] as const;
|
||||
|
||||
export type ReasoningEffort = (typeof REASONING_EFFORTS)[number];
|
||||
|
||||
export function isReasoningEffort(value: unknown): value is ReasoningEffort {
|
||||
return typeof value === "string" && (REASONING_EFFORTS as readonly string[]).includes(value);
|
||||
}
|
||||
|
||||
export function normalizeReasoningEffort(value: unknown): ReasoningEffort | null {
|
||||
return isReasoningEffort(value) ? value : null;
|
||||
}
|
||||
|
||||
export function supportedEffortsForModelOption(model: PanelModelOption | null): ReasoningEffort[] {
|
||||
const efforts = model?.supportedReasoningEfforts.filter(isReasoningEffort) ?? [];
|
||||
return efforts.length > 0 ? efforts : [...REASONING_EFFORTS];
|
||||
}
|
||||
|
||||
export function defaultEffortForModelOption(model: PanelModelOption | null): ReasoningEffort | null {
|
||||
return normalizeReasoningEffort(model?.defaultReasoningEffort);
|
||||
}
|
||||
|
||||
export function sortedModelOptions(models: readonly PanelModelOption[]): PanelModelOption[] {
|
||||
return [...models]
|
||||
.filter((model) => !model.hidden)
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
import type { PanelModelOption } from "./model";
|
||||
|
||||
export const REASONING_EFFORTS = ["none", "minimal", "low", "medium", "high", "xhigh"] as const;
|
||||
|
||||
export type ReasoningEffort = (typeof REASONING_EFFORTS)[number];
|
||||
|
||||
export function isReasoningEffort(value: unknown): value is ReasoningEffort {
|
||||
return typeof value === "string" && (REASONING_EFFORTS as readonly string[]).includes(value);
|
||||
}
|
||||
|
||||
export function normalizeReasoningEffort(value: unknown): ReasoningEffort | null {
|
||||
return isReasoningEffort(value) ? value : null;
|
||||
}
|
||||
|
||||
export function supportedEffortsForModelOption(model: PanelModelOption | null): ReasoningEffort[] {
|
||||
const efforts = model?.supportedReasoningEfforts.filter(isReasoningEffort) ?? [];
|
||||
return efforts.length > 0 ? efforts : [...REASONING_EFFORTS];
|
||||
}
|
||||
|
||||
export function defaultEffortForModelOption(model: PanelModelOption | null): ReasoningEffort | null {
|
||||
return normalizeReasoningEffort(model?.defaultReasoningEffort);
|
||||
}
|
||||
|
|
@ -2,7 +2,7 @@ import { type AppServerDiagnostics, capabilityProbeError, capabilityProbeOk } fr
|
|||
import type { RateLimitSnapshot } from "../../../generated/app-server/v2/RateLimitSnapshot";
|
||||
import type { SharedAppServerMetadata } from "../../../app-server/shared-cache-state";
|
||||
import { panelModelOptionsFromAppServerModels, panelSkillOptionsFromAppServerSkills } from "../../../app-server/catalog-model";
|
||||
import type { PanelModelOption, PanelSkillOption } from "../../../domain/catalog/model";
|
||||
import type { PanelModelOption, PanelSkillOption } from "../../../domain/catalog/metadata";
|
||||
import { cloneAppServerDiagnostics, type ChatAppServerBaseHost } from "./shared";
|
||||
|
||||
export interface ChatAppServerMetadataActionsHost extends ChatAppServerBaseHost {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import type { InitializeResponse } from "../../generated/app-server/InitializeResponse";
|
||||
import type { PanelThread } from "../../domain/threads/model";
|
||||
import type { ThreadTokenUsage } from "../../generated/app-server/v2/ThreadTokenUsage";
|
||||
import type { ReasoningEffort } from "../../domain/catalog/reasoning-effort";
|
||||
import type { ReasoningEffort } from "../../domain/catalog/metadata";
|
||||
import type { ChatRuntimeState } from "./runtime/state";
|
||||
import type { PanelCollaborationMode } from "./runtime/collaboration";
|
||||
import { parseServiceTier, type ServiceTier } from "../../app-server/service-tier";
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import type { InitializeResponse } from "../../generated/app-server/InitializeResponse";
|
||||
import type { ReasoningEffort } from "../../domain/catalog/reasoning-effort";
|
||||
import type { ReasoningEffort } from "../../domain/catalog/metadata";
|
||||
import type { ConfigReadResponse } from "../../generated/app-server/v2/ConfigReadResponse";
|
||||
import type { RateLimitSnapshot } from "../../generated/app-server/v2/RateLimitSnapshot";
|
||||
import type { PanelThread } from "../../domain/threads/model";
|
||||
import type { PanelModelOption, PanelSkillOption } from "../../domain/catalog/model";
|
||||
import type { PanelModelOption, PanelSkillOption } from "../../domain/catalog/metadata";
|
||||
import type { ThreadGoal } from "../../generated/app-server/v2/ThreadGoal";
|
||||
import type { ThreadSettingsUpdateParams } from "../../generated/app-server/v2/ThreadSettingsUpdateParams";
|
||||
import type { ThreadTokenUsage } from "../../generated/app-server/v2/ThreadTokenUsage";
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import type { PanelThread } from "../../../domain/threads/model";
|
||||
import type { PanelModelOption, PanelSkillOption } from "../../../domain/catalog/model";
|
||||
import type { PanelModelOption, PanelSkillOption } from "../../../domain/catalog/metadata";
|
||||
import { prepareFuzzySearch, sortSearchResults, type SearchResult } from "obsidian";
|
||||
import { findModelOptionByIdOrName, sortedModelOptions } from "../../../domain/catalog/model";
|
||||
import { isReasoningEffort, REASONING_EFFORTS, supportedEffortsForModelOption } from "../../../domain/catalog/reasoning-effort";
|
||||
import { findModelOptionByIdOrName, sortedModelOptions } from "../../../domain/catalog/metadata";
|
||||
import { isReasoningEffort, REASONING_EFFORTS, supportedEffortsForModelOption } from "../../../domain/catalog/metadata";
|
||||
import { SLASH_COMMANDS, slashCommandSubcommands, type SlashCommandName } from "./slash-commands";
|
||||
import { getThreadTitle } from "../../../domain/threads/model";
|
||||
import { shortThreadId } from "../../../utils";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import type { UserInput } from "../../../generated/app-server/v2/UserInput";
|
||||
import type { PanelSkillOption } from "../../../domain/catalog/model";
|
||||
import type { PanelSkillOption } from "../../../domain/catalog/metadata";
|
||||
import { parseObsidianWikiLink } from "../../../shared/obsidian/wikilinks";
|
||||
|
||||
export interface ParsedWikiLink {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import {
|
|||
serviceTierLabel,
|
||||
supportedReasoningEfforts,
|
||||
} from "../../runtime/effective-settings";
|
||||
import { sortedModelOptions } from "../../../../domain/catalog/model";
|
||||
import { sortedModelOptions } from "../../../../domain/catalog/metadata";
|
||||
import { contextSummary, rateLimitSummary, type RateLimitSummary } from "../../runtime/status-summary";
|
||||
import type {
|
||||
EffortStatusLinesInput,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import type { ReasoningEffort } from "../../../../domain/catalog/reasoning-effort";
|
||||
import type { ReasoningEffort } from "../../../../domain/catalog/metadata";
|
||||
import type { RuntimeSnapshot } from "../../runtime/effective-settings";
|
||||
import type { EffectiveConfigSection, RateLimitSummary } from "../../runtime/status-summary";
|
||||
import type { ChatState } from "../../chat-state";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import type { ReasoningEffort } from "../../../../domain/catalog/reasoning-effort";
|
||||
import type { ReasoningEffort } from "../../../../domain/catalog/metadata";
|
||||
import type { RuntimeSnapshot } from "../../runtime/effective-settings";
|
||||
import type { SendShortcut } from "../../../../shared/ui/keyboard";
|
||||
import type { ChatState } from "../../chat-state";
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import type { SandboxMode } from "../../../generated/app-server/v2/SandboxMode";
|
|||
import type { SandboxWorkspaceWrite } from "../../../generated/app-server/v2/SandboxWorkspaceWrite";
|
||||
import type { ToolsV2 } from "../../../generated/app-server/v2/ToolsV2";
|
||||
import { parseServiceTier, type ServiceTier } from "../../../app-server/service-tier";
|
||||
import { isReasoningEffort, type ReasoningEffort } from "../../../domain/catalog/reasoning-effort";
|
||||
import { isReasoningEffort, type ReasoningEffort } from "../../../domain/catalog/metadata";
|
||||
import { approvalsReviewerOrNull, type ApprovalsReviewer } from "./approvals";
|
||||
|
||||
export interface RuntimeConfigProjection {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import type { AskForApproval } from "../../../generated/app-server/v2/AskForAppr
|
|||
import type { ConfigReadResponse } from "../../../generated/app-server/v2/ConfigReadResponse";
|
||||
import type { RateLimitSnapshot } from "../../../generated/app-server/v2/RateLimitSnapshot";
|
||||
import type { ThreadTokenUsage } from "../../../generated/app-server/v2/ThreadTokenUsage";
|
||||
import { findModelOptionByIdOrName, type PanelModelOption } from "../../../domain/catalog/model";
|
||||
import { findModelOptionByIdOrName, type PanelModelOption } from "../../../domain/catalog/metadata";
|
||||
import {
|
||||
configuredServiceTierRequestValue,
|
||||
isFastServiceTier,
|
||||
|
|
@ -11,7 +11,7 @@ import {
|
|||
type ServiceTier,
|
||||
type ServiceTierRequest,
|
||||
} from "../../../app-server/service-tier";
|
||||
import { supportedEffortsForModelOption, type ReasoningEffort } from "../../../domain/catalog/reasoning-effort";
|
||||
import { supportedEffortsForModelOption, type ReasoningEffort } from "../../../domain/catalog/metadata";
|
||||
import { readRuntimeConfig, type RuntimeConfigProjection } from "./config";
|
||||
import type { PanelCollaborationMode } from "./collaboration";
|
||||
import { isAutoReviewReviewer, type ApprovalsReviewer } from "./approvals";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { isReasoningEffort, type ReasoningEffort } from "../../../domain/catalog/reasoning-effort";
|
||||
import { isReasoningEffort, type ReasoningEffort } from "../../../domain/catalog/metadata";
|
||||
export { collaborationModeLabel, collaborationModeToggleMessage, nextCollaborationMode } from "./collaboration";
|
||||
|
||||
const DEFAULT_ALIASES = new Set(["default", "reset", "clear", "off"]);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import type { AppServerClient } from "../../../app-server/client";
|
||||
import type { ReasoningEffort } from "../../../domain/catalog/reasoning-effort";
|
||||
import type { ReasoningEffort } from "../../../domain/catalog/metadata";
|
||||
import { autoReviewReviewerForState, autoReviewToggleMessage, nextAutoReviewState } from "./approvals";
|
||||
import type { PanelCollaborationMode } from "./collaboration";
|
||||
import { collaborationModeToggleMessage, nextCollaborationMode } from "./override-commands";
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import type { AskForApproval } from "../../../generated/app-server/v2/AskForAppr
|
|||
import type { ThreadSettingsUpdateParams } from "../../../generated/app-server/v2/ThreadSettingsUpdateParams";
|
||||
import { parseServiceTier, type ServiceTier } from "../../../app-server/service-tier";
|
||||
import type { PanelCollaborationMode } from "./collaboration";
|
||||
import type { ReasoningEffort } from "../../../domain/catalog/reasoning-effort";
|
||||
import type { ReasoningEffort } from "../../../domain/catalog/metadata";
|
||||
import type { ApprovalsReviewer } from "./approvals";
|
||||
import type { RequestedServiceTier } from "./service-tier-state";
|
||||
import {
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ import type { RateLimitWindow } from "../../../generated/app-server/v2/RateLimit
|
|||
import type { SpendControlLimitSnapshot } from "../../../generated/app-server/v2/SpendControlLimitSnapshot";
|
||||
import type { ThreadTokenUsage } from "../../../generated/app-server/v2/ThreadTokenUsage";
|
||||
import { jsonPreview } from "../../../utils";
|
||||
import { sortedModelOptions } from "../../../domain/catalog/model";
|
||||
import { defaultEffortForModelOption } from "../../../domain/catalog/reasoning-effort";
|
||||
import { sortedModelOptions } from "../../../domain/catalog/metadata";
|
||||
import { defaultEffortForModelOption } from "../../../domain/catalog/metadata";
|
||||
import { readRuntimeConfig, type RuntimeConfigProjection } from "./config";
|
||||
import {
|
||||
currentApprovalsReviewer,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { parseServiceTier } from "../../../app-server/service-tier";
|
||||
import { upsertThread } from "../../../domain/threads/model";
|
||||
import { panelThreadFromAppServerThread } from "../../../app-server/thread-model";
|
||||
import type { ReasoningEffort } from "../../../domain/catalog/reasoning-effort";
|
||||
import type { ReasoningEffort } from "../../../domain/catalog/metadata";
|
||||
import type { AskForApproval } from "../../../generated/app-server/v2/AskForApproval";
|
||||
import type { PanelThread } from "../../../domain/threads/model";
|
||||
import type { ThreadStartResponse } from "../../../generated/app-server/v2/ThreadStartResponse";
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import {
|
|||
} from "./slash-command-execution";
|
||||
import type { SlashCommandName } from "../composer/slash-commands";
|
||||
import type { DisplayDetailSection } from "../display/types";
|
||||
import type { ReasoningEffort } from "../../../domain/catalog/reasoning-effort";
|
||||
import type { ReasoningEffort } from "../../../domain/catalog/metadata";
|
||||
import type { ThreadGoal } from "../../../generated/app-server/v2/ThreadGoal";
|
||||
import type { ThreadGoalStatus } from "../../../generated/app-server/v2/ThreadGoalStatus";
|
||||
import type { UserInput } from "../../../generated/app-server/v2/UserInput";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import type { ReasoningEffort } from "../../../domain/catalog/reasoning-effort";
|
||||
import type { ReasoningEffort } from "../../../domain/catalog/metadata";
|
||||
import type { PanelThread } from "../../../domain/threads/model";
|
||||
import type { ThreadGoal } from "../../../generated/app-server/v2/ThreadGoal";
|
||||
import type { ThreadGoalStatus } from "../../../generated/app-server/v2/ThreadGoalStatus";
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ import { ItemView, type ViewStateResult, type WorkspaceLeaf } from "obsidian";
|
|||
import type { AppServerClient } from "../../app-server/client";
|
||||
import { VIEW_TYPE_CODEX_PANEL } from "../../constants";
|
||||
import type { DisplayDetailSection, DisplayItem } from "./display/types";
|
||||
import type { ReasoningEffort } from "../../domain/catalog/reasoning-effort";
|
||||
import type { PanelModelOption } from "../../domain/catalog/model";
|
||||
import type { ReasoningEffort } from "../../domain/catalog/metadata";
|
||||
import type { PanelModelOption } from "../../domain/catalog/metadata";
|
||||
import type { PanelThread } from "../../domain/threads/model";
|
||||
import { collaborationModeLabel as formatCollaborationModeLabel } from "./runtime/override-commands";
|
||||
import type { RuntimeSnapshot } from "./runtime/effective-settings";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import type { EditorPosition } from "obsidian";
|
||||
import type { ReasoningEffort } from "../../domain/catalog/reasoning-effort";
|
||||
import type { ReasoningEffort } from "../../domain/catalog/metadata";
|
||||
|
||||
type SelectionRewriteStatus = SelectionRewriteState["status"];
|
||||
const TERMINAL_SELECTION_REWRITE_STATUSES = new Set<SelectionRewriteStatus>(["applied", "cancelled"]);
|
||||
|
|
|
|||
|
|
@ -8,13 +8,13 @@ import type { InitializeResponse } from "../../generated/app-server/InitializeRe
|
|||
import type { RequestId } from "../../generated/app-server/RequestId";
|
||||
import type { ServerNotification } from "../../generated/app-server/ServerNotification";
|
||||
import type { JsonValue } from "../../generated/app-server/serde_json/JsonValue";
|
||||
import type { ReasoningEffort } from "../../domain/catalog/reasoning-effort";
|
||||
import type { ReasoningEffort } from "../../domain/catalog/metadata";
|
||||
import type { ThreadItem } from "../../generated/app-server/v2/ThreadItem";
|
||||
import type { ThreadStartResponse } from "../../generated/app-server/v2/ThreadStartResponse";
|
||||
import type { Turn } from "../../generated/app-server/v2/Turn";
|
||||
import type { TurnStartResponse } from "../../generated/app-server/v2/TurnStartResponse";
|
||||
import { loadPanelModelOptions } from "../../app-server/catalog-data";
|
||||
import type { PanelModelOption } from "../../domain/catalog/model";
|
||||
import type { PanelModelOption } from "../../domain/catalog/metadata";
|
||||
import { runtimeOverride, validatedRuntimeOverrideForModelOptions } from "../../app-server/runtime-overrides";
|
||||
import type { SelectionRewriteRuntimeSettings } from "./model";
|
||||
import { SELECTION_REWRITE_DEVELOPER_INSTRUCTIONS, SELECTION_REWRITE_SERVICE_NAME } from "./prompt";
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import type { AppServerClient } from "../app-server/client";
|
|||
import { loadPanelHooksForCwd, loadPanelModelOptions } from "../app-server/catalog-data";
|
||||
import { appServerHookOperationFromPanelHookItem } from "../app-server/catalog-model";
|
||||
import { panelThreadFromAppServerThread, panelThreadsFromAppServerThreads } from "../app-server/thread-model";
|
||||
import type { PanelHookItem, PanelModelOption } from "../domain/catalog/model";
|
||||
import type { PanelHookItem, PanelModelOption } from "../domain/catalog/metadata";
|
||||
import type { PanelThread } from "../domain/threads/model";
|
||||
import { errorMessage } from "../utils";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { Setting } from "obsidian";
|
||||
|
||||
import type { PanelHookItem } from "../domain/catalog/model";
|
||||
import type { PanelHookItem } from "../domain/catalog/metadata";
|
||||
import type { PanelThread } from "../domain/threads/model";
|
||||
import { archivedThreadDisplayTitle } from "../domain/threads/model";
|
||||
import { shortThreadId } from "../utils";
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import { FileSystemAdapter, type App } from "obsidian";
|
||||
|
||||
import { DEFAULT_CODEX_PATH } from "../constants";
|
||||
import type { ReasoningEffort } from "../domain/catalog/reasoning-effort";
|
||||
import { normalizeReasoningEffort } from "../domain/catalog/reasoning-effort";
|
||||
import type { ReasoningEffort } from "../domain/catalog/metadata";
|
||||
import { normalizeReasoningEffort } from "../domain/catalog/metadata";
|
||||
import type { SendShortcut } from "../shared/ui/keyboard";
|
||||
|
||||
export interface CodexPanelSettings {
|
||||
|
|
|
|||
|
|
@ -3,11 +3,11 @@ import { type App, Notice, type Plugin, PluginSettingTab, Setting, setIcon } fro
|
|||
import type { AppServerClient } from "../app-server/client";
|
||||
import { withShortLivedAppServerClient } from "../app-server/short-lived-client";
|
||||
import { DEFAULT_CODEX_PATH } from "../constants";
|
||||
import type { ReasoningEffort } from "../domain/catalog/reasoning-effort";
|
||||
import type { PanelHookItem, PanelModelOption } from "../domain/catalog/model";
|
||||
import type { ReasoningEffort } from "../domain/catalog/metadata";
|
||||
import type { PanelHookItem, PanelModelOption } from "../domain/catalog/metadata";
|
||||
import type { PanelThread } from "../domain/threads/model";
|
||||
import { REASONING_EFFORTS, supportedEffortsForModelOption } from "../domain/catalog/reasoning-effort";
|
||||
import { findModelOptionByIdOrName, sortedModelOptions } from "../domain/catalog/model";
|
||||
import { REASONING_EFFORTS, supportedEffortsForModelOption } from "../domain/catalog/metadata";
|
||||
import { findModelOptionByIdOrName, sortedModelOptions } from "../domain/catalog/metadata";
|
||||
import { archivedThreadDisplayTitle } from "../domain/threads/model";
|
||||
import { errorMessage } from "../utils";
|
||||
import {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import type { App } from "obsidian";
|
|||
|
||||
import { VIEW_TYPE_CODEX_THREADS } from "../constants";
|
||||
import { CodexThreadsView } from "../features/threads-view/view";
|
||||
import type { PanelModelOption } from "../domain/catalog/model";
|
||||
import type { PanelModelOption } from "../domain/catalog/metadata";
|
||||
import type { PanelThread } from "../domain/threads/model";
|
||||
import type { SharedAppServerMetadata } from "../app-server/shared-cache-state";
|
||||
import type { WorkspacePanelCoordinator } from "./panel-coordinator";
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import {
|
|||
cachedSharedThreadList,
|
||||
createSharedAppServerState,
|
||||
} from "../../src/app-server/shared-cache-state";
|
||||
import type { PanelModelOption } from "../../src/domain/catalog/model";
|
||||
import type { PanelModelOption } from "../../src/domain/catalog/metadata";
|
||||
import type { PanelThread } from "../../src/domain/threads/model";
|
||||
import type { Thread } from "../../src/generated/app-server/v2/Thread";
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { describe, expect, it } from "vitest";
|
|||
|
||||
import type { ReasoningEffort } from "../../../../src/generated/app-server/ReasoningEffort";
|
||||
import type { Thread } from "../../../../src/generated/app-server/v2/Thread";
|
||||
import type { PanelModelOption } from "../../../../src/domain/catalog/model";
|
||||
import type { PanelModelOption } from "../../../../src/domain/catalog/metadata";
|
||||
import {
|
||||
activeComposerSuggestions,
|
||||
applyComposerSuggestionInsertion,
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import { createChatState, createChatStateStore, type ChatState } from "../../../
|
|||
import { runtimeSnapshotForChatSlices } from "../../../../src/features/chat/panel/model";
|
||||
import type { ActiveThreadSettingsAppliedAction } from "../../../../src/features/chat/chat-state-actions";
|
||||
import type { AppServerClient } from "../../../../src/app-server/client";
|
||||
import type { PanelModelOption } from "../../../../src/domain/catalog/model";
|
||||
import type { PanelModelOption } from "../../../../src/domain/catalog/metadata";
|
||||
|
||||
describe("createChatRuntimeSettingsActions", () => {
|
||||
it("applies pending runtime overrides through thread settings and commits them", async () => {
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ import {
|
|||
toolbarViewModel,
|
||||
} from "../../../src/features/chat/panel/model";
|
||||
import type { ChatState } from "../../../src/features/chat/chat-state";
|
||||
import type { PanelModelOption } from "../../../src/domain/catalog/model";
|
||||
import type { PanelModelOption } from "../../../src/domain/catalog/metadata";
|
||||
import type { Thread } from "../../../src/generated/app-server/v2/Thread";
|
||||
import type { ConfigReadResponse } from "../../../src/generated/app-server/v2/ConfigReadResponse";
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ import {
|
|||
type SelectionRewriteClientFactory,
|
||||
} from "../../../src/features/selection-rewrite/runner";
|
||||
import type { AppServerClientHandlers } from "../../../src/app-server/client";
|
||||
import type { PanelModelOption } from "../../../src/domain/catalog/model";
|
||||
import type { PanelModelOption } from "../../../src/domain/catalog/metadata";
|
||||
import type { InitializeResponse } from "../../../src/generated/app-server/InitializeResponse";
|
||||
import type { ServerNotification } from "../../../src/generated/app-server/ServerNotification";
|
||||
import type { JsonValue } from "../../../src/generated/app-server/serde_json/JsonValue";
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import type { ConfigReadResponse } from "../../src/generated/app-server/v2/ConfigReadResponse";
|
||||
import type { PanelModelOption } from "../../src/domain/catalog/model";
|
||||
import type { PanelModelOption } from "../../src/domain/catalog/metadata";
|
||||
import {
|
||||
compactModelLabel,
|
||||
compactReasoningEffortLabel,
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import type { Thread } from "../../src/generated/app-server/v2/Thread";
|
|||
import type { HookMetadata } from "../../src/generated/app-server/v2/HookMetadata";
|
||||
import type { Model } from "../../src/generated/app-server/v2/Model";
|
||||
import type { ReasoningEffort } from "../../src/generated/app-server/ReasoningEffort";
|
||||
import type { PanelModelOption } from "../../src/domain/catalog/model";
|
||||
import type { PanelModelOption } from "../../src/domain/catalog/metadata";
|
||||
import { panelModelOptionsFromAppServerModels } from "../../src/app-server/catalog-model";
|
||||
import { CodexPanelSettingTab } from "../../src/settings/tab";
|
||||
import { archivedThreadDisplayTitle } from "../../src/domain/threads/model";
|
||||
|
|
|
|||
Loading…
Reference in a new issue