netheriteai-code 1.0.2 → 1.0.4

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "netheriteai-code",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "NetheriteAI:Code by hurdacu. High-performance coding assistant.",
5
5
  "author": "hurdacu",
6
6
  "license": "MIT",
package/src/agent.js CHANGED
@@ -6,9 +6,11 @@ function isGlmModel(model) {
6
6
  }
7
7
 
8
8
  export function buildSystemPrompt(workspaceRoot, model) {
9
+ const isWin = process.platform === "win32";
9
10
  const lines = [
10
11
  "You are NetheriteAI Code, a terminal coding agent.",
11
12
  `You operate inside this workspace: ${workspaceRoot}`,
13
+ `Current Platform: ${process.platform}${isWin ? " (Use PowerShell syntax for shell commands)" : ""}`,
12
14
  "Use tools when you need filesystem access, shell execution, or todo tracking.",
13
15
  "Before changing files, inspect relevant files first.",
14
16
  "Prefer targeted tools like edit_file, create_file, append_file, and make_dir over overwriting large files when possible.",
package/src/cli.js CHANGED
@@ -11,7 +11,7 @@ import { printTable, resolveWorkspaceRoot } from "./utils.js";
11
11
 
12
12
  const execFileAsync = promisify(execFile);
13
13
 
14
- const VERSION = "1.0.2";
14
+ const VERSION = "1.0.4";
15
15
 
16
16
  async function handleAutoUpdate() {
17
17
  // If we were just restarted by an update, don't check again
package/src/tools.js CHANGED
@@ -258,7 +258,9 @@ async function runOneCommand(root, command, args = [], hooks = {}) {
258
258
  }
259
259
 
260
260
  async function runShellLine(root, commandLine, hooks = {}) {
261
- const result = await runSpawnedCommand(root, "bash", ["-lc", commandLine], hooks);
261
+ const shell = isWin ? "cmd.exe" : "bash";
262
+ const args = isWin ? ["/d", "/s", "/c", commandLine] : ["-lc", commandLine];
263
+ const result = await runSpawnedCommand(root, shell, args, hooks);
262
264
  return {
263
265
  ok: true,
264
266
  commandLine,
@@ -437,3 +439,9 @@ export async function executeToolCall(root, toolCall, hooks = {}) {
437
439
  throw new Error(`Unknown tool: ${name}`);
438
440
  }
439
441
  }
442
+ odo;
443
+ }
444
+ default:
445
+ throw new Error(`Unknown tool: ${name}`);
446
+ }
447
+ }