@myskyline_ai/ccdebug 0.2.4 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +164 -0
- package/README.md +61 -30
- package/package.json +1 -1
- package/web/dist/assets/{index-CZA6u1v6.js → index-BWI7zXi1.js} +20 -20
- package/web/dist/assets/{index-CZA6u1v6.js.map → index-BWI7zXi1.js.map} +1 -1
- package/web/dist/assets/index-DMvSjOqe.css +1 -0
- package/web/dist/index.html +2 -2
- package/web/server/conversation-parser.d.ts.map +1 -1
- package/web/server/conversation-parser.js +42 -8
- package/web/server/conversation-parser.js.map +1 -1
- package/web/dist/assets/index-DSzBm-nK.css +0 -1
- package/web/server/src/types/index.d.ts +0 -68
- package/web/server/src/types/index.d.ts.map +0 -1
- package/web/server/src/types/index.js +0 -3
- package/web/server/src/types/index.js.map +0 -1
- package/web/server/test-path.js +0 -48
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
export interface LogFileInfo {
|
|
2
|
-
id: string;
|
|
3
|
-
name: string;
|
|
4
|
-
path: string;
|
|
5
|
-
modifiedAt: Date;
|
|
6
|
-
size: number;
|
|
7
|
-
}
|
|
8
|
-
export interface ProjectInfo {
|
|
9
|
-
path: string;
|
|
10
|
-
logDir: string;
|
|
11
|
-
}
|
|
12
|
-
export interface ConversationData {
|
|
13
|
-
id: string;
|
|
14
|
-
timestamp: string;
|
|
15
|
-
steps: ConversationStep[];
|
|
16
|
-
conversationCount?: number;
|
|
17
|
-
}
|
|
18
|
-
export interface ConversationStep {
|
|
19
|
-
id: string;
|
|
20
|
-
type: 'user_message' | 'assistant_thinking' | 'assistant_message' | 'tool_call' | 'tool_result' | 'agent_child' | 'agent_end';
|
|
21
|
-
timestamp: string;
|
|
22
|
-
content: string;
|
|
23
|
-
metadata?: Record<string, any>;
|
|
24
|
-
tool_name?: string;
|
|
25
|
-
result?: string;
|
|
26
|
-
parameters?: any;
|
|
27
|
-
tool_use_id?: string;
|
|
28
|
-
rawLogEntry?: any;
|
|
29
|
-
}
|
|
30
|
-
export interface TimelineItem {
|
|
31
|
-
id: string;
|
|
32
|
-
type: 'conversation' | 'step';
|
|
33
|
-
timestamp: string;
|
|
34
|
-
title: string;
|
|
35
|
-
description?: string;
|
|
36
|
-
data: ConversationData | ConversationStep;
|
|
37
|
-
}
|
|
38
|
-
export interface ApiResponse<T = any> {
|
|
39
|
-
success: boolean;
|
|
40
|
-
data?: T;
|
|
41
|
-
error?: string;
|
|
42
|
-
message?: string;
|
|
43
|
-
}
|
|
44
|
-
export interface FilesApiResponse {
|
|
45
|
-
files: LogFileInfo[];
|
|
46
|
-
latest: string | null;
|
|
47
|
-
projectDir: string;
|
|
48
|
-
logDir: string;
|
|
49
|
-
}
|
|
50
|
-
export interface WebSocketEvent {
|
|
51
|
-
event: string;
|
|
52
|
-
data: any;
|
|
53
|
-
timestamp: string;
|
|
54
|
-
}
|
|
55
|
-
export interface WebSocketMessage {
|
|
56
|
-
type: 'connection' | 'file:updated' | 'project:changed' | 'error';
|
|
57
|
-
data: {
|
|
58
|
-
eventType?: string;
|
|
59
|
-
filename?: string;
|
|
60
|
-
fileId?: string;
|
|
61
|
-
files?: LogFileInfo[];
|
|
62
|
-
conversations?: ConversationData[];
|
|
63
|
-
message?: string;
|
|
64
|
-
timestamp: string;
|
|
65
|
-
};
|
|
66
|
-
timestamp: string;
|
|
67
|
-
}
|
|
68
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,IAAI,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd;AAGD,MAAM,WAAW,WAAW;IAC1B,IAAI,EA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,IAAI,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,GAAG,CAAC;IACV,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,YAAY,GAAG,cAAc,GAAG,iBAAiB,GAAG,OAAO,CAAC;IAClE,IAAI,EAAE;QACJ,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,KAAK,CAAC,EAAE,WAAW,EAAE,CAAC;QACtB,aAAa,CAAC,EAAE,gBAAgB,EAAE,CAAC;QACnC,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;IACF,SAAS,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":""}
|
package/web/server/test-path.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
// 测试路径转换逻辑
|
|
2
|
-
const testCases = [
|
|
3
|
-
{
|
|
4
|
-
input: "D:\\mysoft\\cctest\\tests\\办公资产_1\\work",
|
|
5
|
-
expected: "D--mysoft-cctest-tests------1-work"
|
|
6
|
-
},
|
|
7
|
-
{
|
|
8
|
-
input: "/Users/ligf/Code/claude-code/ccdebug/ccdemo",
|
|
9
|
-
expected: "-Users-ligf-Code-claude-code-ccdebug-ccdemo"
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
input: "/Users/ligf/Code/项目/测试",
|
|
13
|
-
expected: "-Users-ligf-Code------" // 修正:4个路径分隔符 + 项目(2个字符) + 测试(2个字符) = 6个 -
|
|
14
|
-
}
|
|
15
|
-
];
|
|
16
|
-
|
|
17
|
-
function generateProjectId(projectPath) {
|
|
18
|
-
return projectPath.replace(/[\/\\:_]/g, '-').replace(/[^\x00-\x7F]/g, '-');
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
console.log('测试路径转换逻辑:');
|
|
22
|
-
console.log('='.repeat(50));
|
|
23
|
-
|
|
24
|
-
testCases.forEach((testCase, index) => {
|
|
25
|
-
const result = generateProjectId(testCase.input);
|
|
26
|
-
const passed = result === testCase.expected;
|
|
27
|
-
|
|
28
|
-
console.log(`测试 ${index + 1}:`);
|
|
29
|
-
console.log(`输入: ${testCase.input}`);
|
|
30
|
-
console.log(`期望: ${testCase.expected}`);
|
|
31
|
-
console.log(`结果: ${result}`);
|
|
32
|
-
console.log(`通过: ${passed ? '✓' : '✗'}`);
|
|
33
|
-
|
|
34
|
-
if (!passed) {
|
|
35
|
-
console.log(`差异分析:`);
|
|
36
|
-
console.log(` 期望长度: ${testCase.expected.length}`);
|
|
37
|
-
console.log(` 结果长度: ${result.length}`);
|
|
38
|
-
for (let i = 0; i < Math.max(testCase.expected.length, result.length); i++) {
|
|
39
|
-
const expectedChar = testCase.expected[i] || '(无)';
|
|
40
|
-
const resultChar = result[i] || '(无)';
|
|
41
|
-
if (expectedChar !== resultChar) {
|
|
42
|
-
console.log(` 位置 ${i}: 期望 '${expectedChar}', 得到 '${resultChar}'`);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
console.log('-'.repeat(30));
|
|
48
|
-
});
|