Skip to content

Commit febcd93

Browse files
committed
refactor(core): 重构代码结构,移动多个模块至 core 文件夹
- 将 ui 目录下的多个模块移动至 ui/core 目录,调整相关导入路径以适配新结构 - 将 common 目录下部分模块重命名移动至 common/runtime 和 common/system,更新导入引用 - 更新测试文件中相关导入路径,确保测试代码正常执行 - 新增 session/utils.ts,抽取并集中管理 getCompactPromptTokenThreshold 与 getTotalTokens 方法 - 调整部分导入钩子名称由 prompt 变更为 hooks,提升代码组织一致性 - 修正部分日志及进程管理模块的导入路径到对应的 logging 和 system 子目录 - 更新 UI 组件和工具相关代码以适应新的模块路径和结构变化
1 parent 33fdcd6 commit febcd93

51 files changed

Lines changed: 108 additions & 113 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/cli.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from "react";
22
import { render } from "ink";
3-
import { setShellIfWindows } from "./common/shell-utils";
3+
import { setShellIfWindows } from "./common/system/shell-utils";
44
import { checkForNpmUpdate, promptForPendingUpdate, type PackageInfo } from "./common/updateCheck";
55
import { AppContainer } from "./ui";
66

src/common/file-utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as fs from "fs";
22
import * as path from "path";
3-
import type { FileState, FileLineEnding } from "./state";
3+
import type { FileState, FileLineEnding } from "./runtime/state";
44

55
export type FileReadMetadata = {
66
content: string;

src/common/permissions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as fs from "fs";
22
import * as path from "path";
33
import type { DeepcodingSettings, PermissionScope, PermissionSettings } from "../settings";
4-
import { isAbsoluteFilePath, normalizeFilePath } from "./state";
4+
import { isAbsoluteFilePath, normalizeFilePath } from "./runtime/state";
55

66
export type BashPermissionScope = Exclude<PermissionScope, "mcp"> | "unknown";
77

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { z } from "zod";
2-
import type { ToolExecutionContext, ToolExecutionResult } from "../tools/executor";
2+
import type { ToolExecutionContext, ToolExecutionResult } from "../../tools/executor";
33

44
export type ValidationResult = { ok: true; input: Record<string, unknown> } | { ok: false; error: string };
55

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as path from "path";
2-
import { posixPathToWindowsPath } from "./shell-utils";
2+
import { posixPathToWindowsPath } from "../system/shell-utils";
33

44
export type FileLineEnding = "LF" | "CRLF";
55

0 commit comments

Comments
 (0)