pi-codebuddy-sdk 0.4.37 → 0.4.39
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/package.json +2 -2
- package/src/cb-session-io.ts +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-codebuddy-sdk",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.39",
|
|
4
4
|
"description": "Pi extension that uses CodeBuddy (via Agent SDK) as a model provider and adds an AskCodebuddy tool.",
|
|
5
5
|
"author": "RealAlexandreAI",
|
|
6
6
|
"license": "MIT",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"typecheck": "tsc --noEmit"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@tencent-ai/agent-sdk": "^0.3.
|
|
37
|
+
"@tencent-ai/agent-sdk": "^0.3.292",
|
|
38
38
|
"change-case": "^5.4.4"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
package/src/cb-session-io.ts
CHANGED
|
@@ -64,8 +64,8 @@ function piToCbMessages(messages: PiMessage[]): CbMessage[] {
|
|
|
64
64
|
return out;
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
function writeCbJsonl(sessionId: string, cwd: string, messages: CbMessage[]): string {
|
|
68
|
-
const jsonlPath = getSessionPath(sessionId, cwd);
|
|
67
|
+
function writeCbJsonl(sessionId: string, cwd: string, messages: CbMessage[], codebuddyDir?: string): string {
|
|
68
|
+
const jsonlPath = getSessionPath(sessionId, cwd, codebuddyDir);
|
|
69
69
|
mkdirSync(join(jsonlPath, ".."), { recursive: true });
|
|
70
70
|
const lines: string[] = [];
|
|
71
71
|
let parentId: string | undefined;
|
|
@@ -112,7 +112,7 @@ export class Session {
|
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
save(): void {
|
|
115
|
-
writeCbJsonl(this.sessionId, this.projectPath, this.messages);
|
|
115
|
+
writeCbJsonl(this.sessionId, this.projectPath, this.messages, this.codebuddyDir);
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
118
|
|