ed91e47107
- 添加项目配置文件(tsconfig.json、bunfig.toml、.gitignore、.env.example) - 创建文档架构图(00runtime.png 至 08-state-data-flow.png) - 添加核心工具常量定义(FileEditTool、AgentTool、BashTool 等) - 实现基础命令框架(help、exit、config、model 等) - 添加 Ink TUI 组件库和布局引擎 - 包含内存管理、沙箱、shell 工具等基础工具类 - 设置预加载脚本和版本信息
46 lines
1.1 KiB
TypeScript
46 lines
1.1 KiB
TypeScript
export type SyntaxTheme = {
|
|
theme: string;
|
|
source: string | null;
|
|
};
|
|
|
|
export class ColorDiff {
|
|
private hunk: { oldStart: number; oldLines: number; newStart: number; newLines: number; lines: string[] };
|
|
private filePath: string;
|
|
private firstLine: string | null;
|
|
private prefixContent: string | null;
|
|
|
|
constructor(
|
|
hunk: { oldStart: number; oldLines: number; newStart: number; newLines: number; lines: string[] },
|
|
firstLine: string | null,
|
|
filePath: string,
|
|
prefixContent?: string | null,
|
|
) {
|
|
this.hunk = hunk;
|
|
this.filePath = filePath;
|
|
this.firstLine = firstLine;
|
|
this.prefixContent = prefixContent ?? null;
|
|
}
|
|
|
|
render(themeName: string, width: number, dim: boolean): string[] | null {
|
|
return null;
|
|
}
|
|
}
|
|
|
|
export class ColorFile {
|
|
private code: string;
|
|
private filePath: string;
|
|
|
|
constructor(code: string, filePath: string) {
|
|
this.code = code;
|
|
this.filePath = filePath;
|
|
}
|
|
|
|
render(themeName: string, width: number, dim: boolean): string[] | null {
|
|
return null;
|
|
}
|
|
}
|
|
|
|
export function getSyntaxTheme(themeName: string): SyntaxTheme {
|
|
return { theme: themeName, source: null };
|
|
}
|