Skip to content

Commit 5fd54b9

Browse files
committed
refactor(src): 重构路径引用并重命名部分模块
- 统一调整内部模块导入路径,移除多余的 system 子目录 - 重命名 common/runtime/state.ts 为 common/state.ts 并同步更新相关引用 - 重命名 common/runtime/validate.ts 为 common/validate.ts 并同步更新相关引用 - 重命名 common/runtime/file-history.ts 为 common/file-history 并同步更新相关引用 - 更新测试文件和工具模块中对应的导入路径,确保一致性 - 保持代码逻辑不变,仅调整代码结构和模块路径优化维护性
1 parent 192d02d commit 5fd54b9

25 files changed

Lines changed: 28 additions & 34 deletions

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/system/shell-utils";
3+
import { setShellIfWindows } from "./common/shell-utils";
44
import { checkForNpmUpdate, promptForPendingUpdate, type PackageInfo } from "./common/update-check";
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 "./runtime/state";
3+
import type { FileState, FileLineEnding } from "./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 "./runtime/state";
4+
import { isAbsoluteFilePath, normalizeFilePath } from "./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 * as path from "path";
2-
import { posixPathToWindowsPath } from "../system/shell-utils";
2+
import { posixPathToWindowsPath } from "./shell-utils";
33

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

0 commit comments

Comments
 (0)