Browse Source

Clean up old pre-streaming code

Saoud Rizwan 1 year ago
parent
commit
68b87e6056
4 changed files with 79 additions and 691 deletions
  1. 0 7
      package-lock.json
  2. 0 1
      package.json
  3. 76 680
      src/core/ClaudeDev.ts
  4. 3 3
      src/core/prompts/system.ts

+ 0 - 7
package-lock.json

@@ -13,7 +13,6 @@
         "@anthropic-ai/sdk": "^0.26.0",
         "@anthropic-ai/sdk": "^0.26.0",
         "@anthropic-ai/vertex-sdk": "^0.4.1",
         "@anthropic-ai/vertex-sdk": "^0.4.1",
         "@google/generative-ai": "^0.18.0",
         "@google/generative-ai": "^0.18.0",
-        "@streamparser/json": "^0.0.21",
         "@types/clone-deep": "^4.0.4",
         "@types/clone-deep": "^4.0.4",
         "@types/pdf-parse": "^1.1.4",
         "@types/pdf-parse": "^1.1.4",
         "@types/turndown": "^5.0.5",
         "@types/turndown": "^5.0.5",
@@ -4493,12 +4492,6 @@
       "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz",
       "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz",
       "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ=="
       "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ=="
     },
     },
-    "node_modules/@streamparser/json": {
-      "version": "0.0.21",
-      "resolved": "https://registry.npmjs.org/@streamparser/json/-/json-0.0.21.tgz",
-      "integrity": "sha512-v+49JBiG1kmc/9Ug79Lz9wyKaRocBgCnpRaLpdy7p0d3ICKtOAfc/H/Epa1j3F6YdnzjnZKKrnJ8xnh/v1P8Aw==",
-      "license": "MIT"
-    },
     "node_modules/@tootallnate/quickjs-emscripten": {
     "node_modules/@tootallnate/quickjs-emscripten": {
       "version": "0.23.0",
       "version": "0.23.0",
       "resolved": "https://registry.npmjs.org/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz",
       "resolved": "https://registry.npmjs.org/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz",

+ 0 - 1
package.json

@@ -149,7 +149,6 @@
     "@anthropic-ai/sdk": "^0.26.0",
     "@anthropic-ai/sdk": "^0.26.0",
     "@anthropic-ai/vertex-sdk": "^0.4.1",
     "@anthropic-ai/vertex-sdk": "^0.4.1",
     "@google/generative-ai": "^0.18.0",
     "@google/generative-ai": "^0.18.0",
-    "@streamparser/json": "^0.0.21",
     "@types/clone-deep": "^4.0.4",
     "@types/clone-deep": "^4.0.4",
     "@types/pdf-parse": "^1.1.4",
     "@types/pdf-parse": "^1.1.4",
     "@types/turndown": "^5.0.5",
     "@types/turndown": "^5.0.5",

File diff suppressed because it is too large
+ 76 - 680
src/core/ClaudeDev.ts


+ 3 - 3
src/core/prompts/system.ts

@@ -73,9 +73,9 @@ Current Working Directory: ${cwd.toPosix()}
 
 
 ====
 ====
 
 
-INSTRUCTIONS FOR FORMULATING YOUR RESPONSE
+INSTRUCTIONS FOR FORMULATING RESPONSE
 
 
-You must respond to the user's request by using at least one tool call. When formulating your response, follow these guidelines:
+You must respond to the user's message with at least one tool call. When formulating your response, follow these guidelines:
 
 
 1. You might begin your response explaining your thoughts, analysis, plan of action, etc.
 1. You might begin your response explaining your thoughts, analysis, plan of action, etc.
 2. Place ALL tool calls at the END of your message.
 2. Place ALL tool calls at the END of your message.
@@ -96,7 +96,7 @@ Remember:
 - Choose the most appropriate tool(s) based on the task and the tool descriptions provided.
 - Choose the most appropriate tool(s) based on the task and the tool descriptions provided.
 - Formulate your tool calls using the XML format specified for each tool.
 - Formulate your tool calls using the XML format specified for each tool.
 - Provide clear explanations about what actions you're taking and why you're using particular tools.
 - Provide clear explanations about what actions you're taking and why you're using particular tools.
-- Act as if the tool calls will be executed immediately after your message, and your next response will have access to their results.
+- The tool calls will be executed immediately after your message, and the user's next response will include their results.
 
 
 # Tool Calls Formatting
 # Tool Calls Formatting
 
 

Some files were not shown because too many files changed in this diff