mirror of
https://github.com/murashit/codex-panel.git
synced 2026-07-22 06:57:10 +00:00
Remove unnecessary re-exports
This commit is contained in:
parent
31c493ed63
commit
439aca3eb0
34 changed files with 50 additions and 72 deletions
|
|
@ -13,7 +13,7 @@ import type {
|
|||
PendingUserInput,
|
||||
} from "../../domain/pending-requests/model";
|
||||
import { pathRelativeToRoot } from "../../shared/path/file-paths";
|
||||
import { jsonPreview } from "../../utils";
|
||||
import { jsonPreview } from "../../shared/text/preview";
|
||||
|
||||
type AppServerRequestByMethod<Method extends ServerRequest["method"]> = Extract<ServerRequest, { method: Method }>;
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import {
|
|||
type ArchiveExportSettings,
|
||||
type ArchiveThreadInput,
|
||||
} from "../../domain/threads/archive-markdown";
|
||||
import { shortThreadId } from "../../utils";
|
||||
import { shortThreadId } from "../../shared/id/thread-id";
|
||||
|
||||
export interface ArchiveExportResult {
|
||||
path: string;
|
||||
|
|
|
|||
|
|
@ -9,7 +9,8 @@ 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, type ChatAction, type ChatState } from "../../application/state/root-reducer";
|
||||
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";
|
||||
|
|
|
|||
|
|
@ -6,13 +6,9 @@ import type { ServerNotification } from "../../../../app-server/connection/rpc-m
|
|||
import { normalizeExplicitThreadName } from "../../../../domain/threads/model";
|
||||
import type { ThreadConversationSummary } from "../../../../domain/threads/transcript";
|
||||
import type { ThreadCatalogEvent } from "../../../../workspace/thread-catalog";
|
||||
import { jsonPreview } from "../../../../utils";
|
||||
import {
|
||||
activeTurnId,
|
||||
pendingTurnStart as pendingTurnStartForState,
|
||||
type ChatAction,
|
||||
type ChatState,
|
||||
} from "../../application/state/root-reducer";
|
||||
import { jsonPreview } from "../../../../shared/text/preview";
|
||||
import { activeTurnId, pendingTurnStart as pendingTurnStartForState } from "../../application/conversation/turn-state";
|
||||
import type { ChatAction, ChatState } from "../../application/state/root-reducer";
|
||||
import { completeReasoningItems, upsertMessageStreamItemById } from "../../domain/message-stream/updates";
|
||||
import {
|
||||
messageStreamItemFromTurnItem,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { definedProp } from "../../../../../utils";
|
||||
import { definedProp } from "../../../../../shared/object/defined-prop";
|
||||
import type { AgentMessageStreamItem, AgentStateSummary, ExecutionState } from "../../../domain/message-stream/items";
|
||||
import { collabAgentStateExecutionState } from "../../../domain/message-stream/agent-state";
|
||||
import {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { definedProp } from "../../../../../utils";
|
||||
import { definedProp } from "../../../../../shared/object/defined-prop";
|
||||
import type { ExecutionState, HookMessageStreamItem } from "../../../domain/message-stream/items";
|
||||
import {
|
||||
executionStateFromStatus,
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@ import type { CommandMessageStreamTarget, MessageStreamDiagnosticSection, Messag
|
|||
import type { MessageStreamItemProvenance } from "../../../domain/message-stream/provenance";
|
||||
import type { HistoricalTurn } from "../../../../../domain/threads/history";
|
||||
import type { TurnItem } from "../../../../../app-server/protocol/turn";
|
||||
import { definedProp, jsonPreview } from "../../../../../utils";
|
||||
import { definedProp } from "../../../../../shared/object/defined-prop";
|
||||
import { jsonPreview } from "../../../../../shared/text/preview";
|
||||
import { referencedThreadMetadataFromPrompt } from "../../../../../domain/threads/reference";
|
||||
import { turnUserItemText } from "../../../../../app-server/protocol/turn";
|
||||
import { agentMessageStreamItem } from "./agent-items";
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import { findModelMetadataByIdOrName, sortedModelMetadata } from "../../../../do
|
|||
import { supportedEffortsForModelMetadata } from "../../../../domain/catalog/metadata";
|
||||
import { SLASH_COMMANDS, slashCommandSubcommands, type SlashCommandName } from "./slash-commands";
|
||||
import { threadDisplayTitle } from "../../../../domain/threads/title";
|
||||
import { shortThreadId } from "../../../../utils";
|
||||
import { shortThreadId } from "../../../../shared/id/thread-id";
|
||||
|
||||
export interface ComposerSuggestion {
|
||||
display: string;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import type { PendingTurnStart } from "../state/root-reducer";
|
||||
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 { fileMentionsFromInput } from "../../domain/message-stream/format/file-mentions";
|
||||
|
|
|
|||
|
|
@ -1,9 +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 type { ChatActiveThreadState, ChatMessageStreamState, ChatRuntimeState, ChatState, ChatTurnState } from "../state/root-reducer";
|
||||
import { chatTurnBusy } from "../state/root-reducer";
|
||||
import { messageStreamItems } from "../state/message-stream";
|
||||
import { chatTurnBusy, type ChatTurnState } from "./turn-state";
|
||||
import type { ChatActiveThreadState, ChatState } from "../state/root-reducer";
|
||||
import { messageStreamItems, type ChatMessageStreamState } from "../state/message-stream";
|
||||
|
||||
const IMPLEMENT_PLAN_PROMPT = "Please implement this plan.";
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import { normalizeReasoningEffort } from "../../../../domain/catalog/metadata";
|
|||
import type { Thread } from "../../../../domain/threads/model";
|
||||
import { threadDisplayTitle } from "../../../../domain/threads/title";
|
||||
import type { ReferencedThreadMetadata } from "../../../../domain/threads/reference";
|
||||
import { shortThreadId } from "../../../../utils";
|
||||
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";
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { codexTextInputWithAttachments, type CodexInput } from "../../../../doma
|
|||
import { readReferencedThreadConversationSummaries } from "../../../../app-server/threads";
|
||||
import { referencedThreadPromptBundle, REFERENCED_THREAD_TURN_LIMIT } from "../../../../domain/threads/reference";
|
||||
import type { Thread } from "../../../../domain/threads/model";
|
||||
import { shortThreadId } from "../../../../utils";
|
||||
import { shortThreadId } from "../../../../shared/id/thread-id";
|
||||
import {
|
||||
executeSlashCommand as runSlashCommand,
|
||||
type SlashCommandExecutionPorts,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import type { Thread } from "../../../../domain/threads/model";
|
||||
import type { MessageStreamItem } from "../../domain/message-stream/items";
|
||||
import { activeTurnId, chatTurnBusy, pendingTurnStart, type ChatState, type PendingTurnStart } from "../state/root-reducer";
|
||||
import { activeTurnId, chatTurnBusy, pendingTurnStart, type PendingTurnStart } from "./turn-state";
|
||||
import type { ChatState } from "../state/root-reducer";
|
||||
import { messageStreamItems } from "../state/message-stream";
|
||||
|
||||
export interface SubmissionStateSnapshot {
|
||||
|
|
|
|||
|
|
@ -9,8 +9,6 @@ import type {
|
|||
import type { ChatRequestState } from "./state";
|
||||
import type { ChatUiState } from "../state/ui-state";
|
||||
|
||||
export type { PendingRequestId } from "../../../../domain/pending-requests/model";
|
||||
|
||||
export interface PendingRequestBlockState {
|
||||
approvals: readonly PendingApproval[];
|
||||
pendingUserInputs: readonly PendingUserInput[];
|
||||
|
|
|
|||
|
|
@ -6,15 +6,11 @@ import {
|
|||
type McpElicitationAction,
|
||||
type PendingApproval,
|
||||
type PendingMcpElicitation,
|
||||
type PendingRequestId,
|
||||
type PendingUserInput,
|
||||
} from "../../../../domain/pending-requests/model";
|
||||
import { approvalDetailsDisclosureId } from "../../domain/pending-requests/disclosure-ids";
|
||||
import {
|
||||
pendingRequestBlockStateFromChatState,
|
||||
type PendingRequestBlockActions,
|
||||
type PendingRequestBlockState,
|
||||
type PendingRequestId,
|
||||
} from "./block";
|
||||
import { pendingRequestBlockStateFromChatState, type PendingRequestBlockActions, type PendingRequestBlockState } from "./block";
|
||||
|
||||
interface PendingRequestResponder {
|
||||
resolveApproval: (requestId: PendingRequestId, action: ApprovalAction) => void;
|
||||
|
|
|
|||
|
|
@ -79,11 +79,6 @@ import {
|
|||
} from "./ui-state";
|
||||
import { definedPatch, patchObject } from "./patch";
|
||||
|
||||
export { activeTurnId, chatTurnBusy, pendingTurnStart, type ChatTurnState, type PendingTurnStart } from "../conversation/turn-state";
|
||||
export type { ChatMessageStreamState } from "./message-stream";
|
||||
export type { ChatDisclosureBucket, ChatDisclosureUiState, ChatRenameGeneratingUiState, ChatRenameUiState } from "./ui-state";
|
||||
export { renameGenerationStillActive } from "./ui-state";
|
||||
|
||||
export type ChatConnectionPhase =
|
||||
| { kind: "idle" }
|
||||
| { kind: "connecting" }
|
||||
|
|
@ -118,8 +113,6 @@ export interface ChatActiveThreadState {
|
|||
readonly tokenUsage: ThreadTokenUsage | null;
|
||||
}
|
||||
|
||||
export type { ChatRuntimeState } from "../../domain/runtime/state";
|
||||
|
||||
interface ChatComposerState {
|
||||
readonly draft: string;
|
||||
readonly suggestSelected: number;
|
||||
|
|
|
|||
|
|
@ -3,13 +3,8 @@ 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 {
|
||||
renameGenerationStillActive,
|
||||
type ChatAction,
|
||||
type ChatRenameGeneratingUiState,
|
||||
type ChatRenameUiState,
|
||||
type ChatState,
|
||||
} from "../state/root-reducer";
|
||||
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 { firstThreadTitleContextFromMessageStreamItems } from "./title-context";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import type { ActiveThreadIdentitySync } from "./active-thread-identity-sync";
|
||||
import { chatTurnBusy } from "../state/root-reducer";
|
||||
import { chatTurnBusy } from "../conversation/turn-state";
|
||||
import type { ChatStateStore } from "../state/store";
|
||||
|
||||
export interface StartNewThreadActions {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import type { Thread } from "../../../../domain/threads/model";
|
||||
import { chatTurnBusy, type ChatState } from "../state/root-reducer";
|
||||
import { chatTurnBusy } from "../conversation/turn-state";
|
||||
import type { ChatState } from "../state/root-reducer";
|
||||
import { messageStreamIsEmpty } from "../state/message-stream";
|
||||
|
||||
export function activeThreadId(state: ChatState): string | null {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,8 @@ import type { ThreadOperations } from "../../../threads/thread-operations";
|
|||
import { messageStreamItemsFromTurns } from "../../app-server/mappers/message-stream/turn-items";
|
||||
import { resumedThreadActionFromActiveRuntime } from "../state/actions";
|
||||
import { messageStreamRollbackCandidate, messageStreamTurnsAfterTurnId } from "../state/message-stream";
|
||||
import { chatTurnBusy, type ChatAction, type ChatState } from "../state/root-reducer";
|
||||
import { chatTurnBusy } from "../conversation/turn-state";
|
||||
import type { ChatAction, ChatState } from "../state/root-reducer";
|
||||
import type { ChatStateStore } from "../state/store";
|
||||
|
||||
const STATUS_COMPACTION_REQUESTED = "Compaction requested.";
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@ import { batch, computed, signal, type ReadonlySignal, type Signal } from "@prea
|
|||
import type { RuntimeSnapshot } from "../domain/runtime/snapshot";
|
||||
import { messageItemsHaveThreadTurns, runtimeSnapshotForChatSlices } from "../application/runtime/snapshot";
|
||||
import { implementPlanTargetFromState } from "../application/conversation/plan-implementation";
|
||||
import { activeTurnId, chatTurnBusy, type ChatState } from "../application/state/root-reducer";
|
||||
import { activeTurnId, chatTurnBusy } from "../application/conversation/turn-state";
|
||||
import type { ChatState } from "../application/state/root-reducer";
|
||||
import {
|
||||
messageStreamActiveItems,
|
||||
messageStreamItems,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import type { ChatAction, ChatDisclosureBucket, ChatDisclosureUiState } from "../../application/state/root-reducer";
|
||||
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";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import { shortThreadId, truncate } from "../../../../utils";
|
||||
import { shortThreadId } from "../../../../shared/id/thread-id";
|
||||
import { truncate } from "../../../../shared/text/preview";
|
||||
import { failedStatusLabel } from "../../domain/message-stream/execution-state";
|
||||
import { pathRelativeToRoot } from "../../../../shared/path/file-paths";
|
||||
import type {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { shortThreadId } from "../../../../utils";
|
||||
import { shortThreadId } from "../../../../shared/id/thread-id";
|
||||
import { messageStreamReasoningIsActive } from "../../domain/message-stream/semantics/active-turn";
|
||||
import type {
|
||||
AgentRunSummary,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import type { RuntimeConfigSnapshot } from "../../../../domain/runtime/config";
|
||||
import type { RateLimitWindow, SpendControlLimitSnapshot, ThreadTokenUsage } from "../../../../domain/runtime/metrics";
|
||||
import { jsonPreview } from "../../../../utils";
|
||||
import { jsonPreview } from "../../../../shared/text/preview";
|
||||
import {
|
||||
currentServiceTier,
|
||||
currentModel,
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import { renderDisplayDiffLines } from "../../../../shared/diff/render";
|
|||
import { displayDiffLines } from "../../../../shared/diff/unified";
|
||||
import { IconButton } from "../../../../shared/ui/components";
|
||||
import { renderUiRoot } from "../../../../shared/ui/ui-root";
|
||||
import { shortThreadId } from "../../../../utils";
|
||||
import { shortThreadId } from "../../../../shared/id/thread-id";
|
||||
import type { ChatTurnDiffViewState, PersistedChatTurnDiffViewState } from "../../domain/turn-diff";
|
||||
|
||||
export interface ChatTurnDiffViewActions {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { Notice, Platform, SuggestModal, type App } from "obsidian";
|
|||
|
||||
import { threadRecencyAt, type Thread } from "../../domain/threads/model";
|
||||
import { threadDisplayTitle } from "../../domain/threads/title";
|
||||
import { shortThreadId } from "../../utils";
|
||||
import { shortThreadId } from "../../shared/id/thread-id";
|
||||
import type { ThreadCatalogActiveReader } from "../../workspace/thread-catalog";
|
||||
|
||||
export interface ThreadPickerHost {
|
||||
|
|
|
|||
|
|
@ -3,8 +3,6 @@ import { ItemView, type WorkspaceLeaf } from "obsidian";
|
|||
import { VIEW_TYPE_CODEX_THREADS } from "../../constants";
|
||||
import { CodexThreadsSession, type CodexThreadsHost } from "./session";
|
||||
|
||||
export type { CodexThreadsHost, CodexThreadsSettingsAccess } from "./session";
|
||||
|
||||
export class CodexThreadsView extends ItemView {
|
||||
private readonly session: CodexThreadsSession;
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,8 @@ import { persistedChatTurnDiffViewState } from "./features/chat/domain/turn-diff
|
|||
import { CodexChatTurnDiffView } from "./features/chat/ui/turn-diff/view";
|
||||
import { openThreadPicker, type ThreadPickerHost } from "./features/thread-picker/modal";
|
||||
import { archiveExportSettings } from "./features/threads/archive-export-settings";
|
||||
import { CodexThreadsView, type CodexThreadsHost, type CodexThreadsSettingsAccess } from "./features/threads-view/view";
|
||||
import type { CodexThreadsHost, CodexThreadsSettingsAccess } from "./features/threads-view/session";
|
||||
import { CodexThreadsView } from "./features/threads-view/view";
|
||||
import type { CodexPanelSettingTabHost } from "./settings/host";
|
||||
import { WorkspacePanelCoordinator } from "./workspace/panel-coordinator";
|
||||
import { createThreadCatalog, type ThreadCatalog } from "./workspace/thread-catalog";
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import type { ComponentChild as UiNode } from "preact";
|
|||
import type { Thread } from "../domain/threads/model";
|
||||
import { threadArchiveDisplayTitle } from "../domain/threads/title";
|
||||
import { ObsidianExtraButton, ObsidianTextInput, ObsidianToggle } from "../shared/ui/components";
|
||||
import { shortThreadId } from "../utils";
|
||||
import { shortThreadId } from "../shared/id/thread-id";
|
||||
import type { ArchivedThreadSectionState } from "./section-state";
|
||||
import { SettingRow, SettingsGroup, SettingsHeading, SettingsItems, SettingsStatusRow } from "./setting-components";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,3 @@
|
|||
export { definedProp } from "./shared/object/defined-prop";
|
||||
export { jsonPreview, truncate } from "./shared/text/preview";
|
||||
export { shortThreadId } from "./shared/id/thread-id";
|
||||
|
||||
export function errorMessage(error: unknown): string {
|
||||
return error instanceof Error ? error.message : String(error);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,12 +6,8 @@ import {
|
|||
type ChatInboundHandlerActions,
|
||||
} from "../../../../../src/features/chat/app-server/inbound/handler";
|
||||
import { attachHookRunsToTurn } from "../../../../../src/features/chat/domain/message-stream/updates";
|
||||
import {
|
||||
chatReducer,
|
||||
pendingTurnStart,
|
||||
type ChatAction,
|
||||
type ChatState,
|
||||
} from "../../../../../src/features/chat/application/state/root-reducer";
|
||||
import { chatReducer, type ChatAction, type ChatState } from "../../../../../src/features/chat/application/state/root-reducer";
|
||||
import { pendingTurnStart } from "../../../../../src/features/chat/application/conversation/turn-state";
|
||||
import type { ChatStateStore } from "../../../../../src/features/chat/application/state/store";
|
||||
import type { ServerNotification, ServerRequest } from "../../../../../src/app-server/connection/rpc-messages";
|
||||
import { appServerApprovalRequest, appServerUserInputRequest } from "../../../../../src/app-server/protocol/server-requests";
|
||||
|
|
|
|||
|
|
@ -2,12 +2,11 @@ import { describe, expect, it } from "vitest";
|
|||
|
||||
import {
|
||||
activeTurnId,
|
||||
chatReducer,
|
||||
chatTurnBusy,
|
||||
pendingTurnStart,
|
||||
type ChatState,
|
||||
} from "../../../src/features/chat/application/state/root-reducer";
|
||||
import { transitionChatTurnLifecycleState } from "../../../src/features/chat/application/conversation/turn-state";
|
||||
transitionChatTurnLifecycleState,
|
||||
} from "../../../src/features/chat/application/conversation/turn-state";
|
||||
import { chatReducer, type ChatState } from "../../../src/features/chat/application/state/root-reducer";
|
||||
import { createChatStateStore } from "../../../src/features/chat/application/state/store";
|
||||
import { messageStreamItems } from "../../../src/features/chat/application/state/message-stream";
|
||||
import type { ThreadGoal } from "../../../src/domain/threads/goal";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import { runtimeSnapshotForChatState } from "../../../../src/features/chat/application/runtime/snapshot";
|
||||
import { activeTurnId, chatTurnBusy, type ChatState } from "../../../../src/features/chat/application/state/root-reducer";
|
||||
import { activeTurnId, chatTurnBusy } from "../../../../src/features/chat/application/conversation/turn-state";
|
||||
import type { ChatState } from "../../../../src/features/chat/application/state/root-reducer";
|
||||
import {
|
||||
messageStreamActiveItems,
|
||||
messageStreamItems,
|
||||
|
|
|
|||
Loading…
Reference in a new issue