Reorganize file structure: core/, utils/, modes/interactive/components/, modes/interactive/theme/

This commit is contained in:
Mario Zechner 2025-12-09 00:51:33 +01:00
parent 00982705f2
commit 83a6c26969
56 changed files with 133 additions and 128 deletions

View file

@ -8,8 +8,19 @@ import { createWriteStream, existsSync, readFileSync, statSync } from "fs";
import { homedir, tmpdir } from "os";
import { extname, join, resolve } from "path";
import stripAnsi from "strip-ansi";
import { getChangelogPath, getNewEntries, parseChangelog } from "./changelog.js";
import { calculateContextTokens, compact, shouldCompact } from "./compaction.js";
import { calculateContextTokens, compact, shouldCompact } from "./core/compaction.js";
import { exportFromFile } from "./core/export-html.js";
import { type BashExecutionMessage, messageTransformer } from "./core/messages.js";
import { findModel, getApiKeyForModel, getAvailableModels } from "./core/model-config.js";
import { loadSessionFromEntries, SessionManager } from "./core/session-manager.js";
import { SettingsManager } from "./core/settings-manager.js";
import { expandSlashCommand, loadSlashCommands } from "./core/slash-commands.js";
import { allTools, codingTools, type ToolName } from "./core/tools/index.js";
import { DEFAULT_MAX_BYTES, truncateTail } from "./core/tools/truncate.js";
import { SessionSelectorComponent } from "./modes/interactive/components/session-selector.js";
import { initTheme } from "./modes/interactive/theme/theme.js";
import { TuiRenderer } from "./tui/tui-renderer.js";
import { getChangelogPath, getNewEntries, parseChangelog } from "./utils/changelog.js";
import {
APP_NAME,
CONFIG_DIR_NAME,
@ -18,20 +29,9 @@ import {
getModelsPath,
getReadmePath,
VERSION,
} from "./config.js";
import { exportFromFile } from "./export-html.js";
import { type BashExecutionMessage, messageTransformer } from "./messages.js";
import { findModel, getApiKeyForModel, getAvailableModels } from "./model-config.js";
import { loadSessionFromEntries, SessionManager } from "./session-manager.js";
import { SettingsManager } from "./settings-manager.js";
import { getShellConfig } from "./shell.js";
import { expandSlashCommand, loadSlashCommands } from "./slash-commands.js";
import { initTheme } from "./theme/theme.js";
import { allTools, codingTools, type ToolName } from "./tools/index.js";
import { DEFAULT_MAX_BYTES, truncateTail } from "./tools/truncate.js";
import { ensureTool } from "./tools-manager.js";
import { SessionSelectorComponent } from "./tui/session-selector.js";
import { TuiRenderer } from "./tui/tui-renderer.js";
} from "./utils/config.js";
import { getShellConfig } from "./utils/shell.js";
import { ensureTool } from "./utils/tools-manager.js";
const defaultModelPerProvider: Record<KnownProvider, string> = {
anthropic: "claude-sonnet-4-5",