pi-codebuddy-sdk 0.4.43 → 0.4.44

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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/index.ts +8 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-codebuddy-sdk",
3
- "version": "0.4.43",
3
+ "version": "0.4.44",
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.298",
37
+ "@tencent-ai/agent-sdk": "0.3.299",
38
38
  "change-case": "^5.4.4"
39
39
  },
40
40
  "peerDependencies": {
package/src/index.ts CHANGED
@@ -1922,11 +1922,17 @@ export default async function (pi: ExtensionAPI) {
1922
1922
  if (allowFull) modeDesc += ` "full": allows writing and bash execution (careful: runs without feedback to pi).`;
1923
1923
 
1924
1924
  if (askConf?.enabled !== false) {
1925
+ type AskCodebuddyMode = (typeof modeValues)[number];
1926
+ type AskCodebuddyThinking = "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max";
1925
1927
  const askCodebuddyParams = Type.Object({
1926
1928
  prompt: Type.String({ description: "The question or task for CodeBuddy. By default CodeBuddy sees the full conversation history. Don't research up front, let CodeBuddy explore." }),
1927
- mode: Type.Optional(StringEnum(modeValues, { description: modeDesc })),
1929
+ mode: Type.Optional(Type.Unsafe<AskCodebuddyMode>(StringEnum(modeValues, { description: modeDesc }))),
1928
1930
  model: Type.Optional(Type.String({ description: "CodeBuddy model ID supported by your account. Omit to use the CLI's account default." })),
1929
- thinking: Type.Optional(StringEnum(["off", "minimal", "low", "medium", "high", "xhigh", "max"] as const, { description: "Thinking effort level. Omit to use CodeBuddy's default." })),
1931
+ thinking: Type.Optional(
1932
+ Type.Unsafe<AskCodebuddyThinking>(
1933
+ StringEnum(["off", "minimal", "low", "medium", "high", "xhigh", "max"] as const, { description: "Thinking effort level. Omit to use CodeBuddy's default." }),
1934
+ ),
1935
+ ),
1930
1936
  isolated: Type.Optional(Type.Boolean({ description: "When true, CodeBuddy sees only this prompt (clean session). When false (default), CodeBuddy sees the full conversation history." })),
1931
1937
  });
1932
1938
  pi.registerTool<typeof askCodebuddyParams>({