editcodewithai 1.0.0 → 1.1.0

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.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  A lightweight, flexible library for AI-powered code editing.
4
4
 
5
+ See also [vizhub-benchmarks](https://github.com/vizhub-core/vizhub-benchmarks).
6
+
5
7
  ## Overview
6
8
 
7
9
  `editcodewithai` is a JavaScript/TypeScript library that enables AI-powered code editing in your applications. It provides a simple interface to send code files and instructions to an LLM (Large Language Model) and receive edited code in return.
@@ -33,7 +35,7 @@ const myLlmFunction = async (prompt: string) => {
33
35
  Authorization: `Bearer ${apiKey}`,
34
36
  },
35
37
  body: JSON.stringify({
36
- model: "openai/gpt-4",
38
+ model: "anthropic/claude-3.5-sonnet",
37
39
  messages: [{ role: "user", content: prompt }],
38
40
  }),
39
41
  },
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
- import { PerformAiEditParams, PerformAiEditResult } from "./types";
1
+ import type { PerformAiEditParams, PerformAiEditResult } from "./types";
2
+ export type { LlmFunction, PerformAiEditParams, PerformAiEditResult, } from "./types";
2
3
  /**
3
4
  * Core AI logic for:
4
5
  * - Building the prompt (including context)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "editcodewithai",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "Edit Code With AI",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -13,7 +13,7 @@
13
13
  "build": "tsc",
14
14
  "prepublishOnly": "npm run build",
15
15
  "typecheck": "tsc --noEmit",
16
- "benchmark": "ts-node src/benchmarks/cli.ts run; cp -r ./benchmarks grader-app/public",
16
+ "benchmark": "vite-node src/benchmarks/cli.ts run; cp -r ./benchmarks grader-app/public",
17
17
  "grade": "ts-node src/benchmarks/cli.ts grade",
18
18
  "benchmark:help": "ts-node src/benchmarks/cli.ts help",
19
19
  "upgrade": "ncu -u",
@@ -40,22 +40,20 @@
40
40
  },
41
41
  "homepage": "https://github.com/vizhub-core/editcodewithai#readme",
42
42
  "dependencies": {
43
- "@langchain/core": "^0.3.43",
44
- "@langchain/openai": "^0.5.4",
45
- "@types/d3": "^7.4.3",
46
43
  "@vizhub/viz-types": "^0.1.0",
47
- "@vizhub/viz-utils": "^0.1.0",
48
- "d3": "^7.9.0",
49
- "dotenv": "^16.4.7",
50
- "langchain": "^0.3.20",
44
+ "@vizhub/viz-utils": "^1.0.1",
45
+ "dotenv": "^16.5.0",
51
46
  "llm-code-format": "^2.0.1"
52
47
  },
53
48
  "devDependencies": {
49
+ "@langchain/core": "^0.3.44",
50
+ "@langchain/openai": "^0.5.5",
51
+ "langchain": "^0.3.21",
54
52
  "cors": "^2.8.5",
55
53
  "express": "^5.1.0",
56
- "npm-check-updates": "^17.1.16",
54
+ "npm-check-updates": "^17.1.18",
57
55
  "prettier": "^3.5.3",
58
- "puppeteer": "^24.6.0",
56
+ "puppeteer": "^24.6.1",
59
57
  "ts-node": "^10.9.2",
60
58
  "typescript": "^5.8.3",
61
59
  "vitest": "^3.1.1"