jinzd-ai-cli 0.1.78 → 0.1.79

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.
@@ -14,7 +14,7 @@ import { platform } from "os";
14
14
  import chalk from "chalk";
15
15
 
16
16
  // src/core/constants.ts
17
- var VERSION = "0.1.78";
17
+ var VERSION = "0.1.79";
18
18
  var APP_NAME = "ai-cli";
19
19
  var CONFIG_DIR_NAME = ".aicli";
20
20
  var CONFIG_FILE_NAME = "config.json";
@@ -16,7 +16,7 @@ import {
16
16
  SUBAGENT_MAX_ROUNDS_LIMIT,
17
17
  VERSION,
18
18
  runTestsTool
19
- } from "./chunk-2FJISNUB.js";
19
+ } from "./chunk-HWYMXTIO.js";
20
20
 
21
21
  // src/config/config-manager.ts
22
22
  import { readFileSync, writeFileSync, existsSync, mkdirSync } from "fs";
@@ -1958,7 +1958,7 @@ var ProviderRegistry = class {
1958
1958
  };
1959
1959
 
1960
1960
  // src/session/session-manager.ts
1961
- import { readFileSync as readFileSync2, writeFileSync as writeFileSync2, existsSync as existsSync2, mkdirSync as mkdirSync2, readdirSync } from "fs";
1961
+ import { readFileSync as readFileSync2, writeFileSync as writeFileSync2, existsSync as existsSync2, mkdirSync as mkdirSync2, readdirSync, unlinkSync } from "fs";
1962
1962
  import { join as join2 } from "path";
1963
1963
  import { v4 as uuidv4 } from "uuid";
1964
1964
 
@@ -2227,6 +2227,19 @@ var SessionManager = class {
2227
2227
  }
2228
2228
  return metas.sort((a, b) => b.updated.getTime() - a.updated.getTime());
2229
2229
  }
2230
+ deleteSession(id) {
2231
+ const filePath = join2(this.historyDir, `${id}.json`);
2232
+ if (!existsSync2(filePath)) return false;
2233
+ try {
2234
+ unlinkSync(filePath);
2235
+ if (this._current && this._current.id === id) {
2236
+ this._current = null;
2237
+ }
2238
+ return true;
2239
+ } catch {
2240
+ return false;
2241
+ }
2242
+ }
2230
2243
  /**
2231
2244
  * 从当前 session 分叉创建新 session。
2232
2245
  *
@@ -2402,7 +2415,7 @@ import { platform } from "os";
2402
2415
  import { resolve } from "path";
2403
2416
 
2404
2417
  // src/tools/undo-stack.ts
2405
- import { readFileSync as readFileSync3, writeFileSync as writeFileSync3, unlinkSync, rmdirSync, existsSync as existsSync4 } from "fs";
2418
+ import { readFileSync as readFileSync3, writeFileSync as writeFileSync3, unlinkSync as unlinkSync2, rmdirSync, existsSync as existsSync4 } from "fs";
2406
2419
  var MAX_UNDO_DEPTH = 20;
2407
2420
  var UndoStack = class {
2408
2421
  stack = [];
@@ -2480,7 +2493,7 @@ var UndoStack = class {
2480
2493
  return { entry, result: `Directory already removed: ${entry.filePath}` };
2481
2494
  } else {
2482
2495
  if (existsSync4(entry.filePath)) {
2483
- unlinkSync(entry.filePath);
2496
+ unlinkSync2(entry.filePath);
2484
2497
  }
2485
2498
  return { entry, result: `Deleted newly created file: ${entry.filePath}` };
2486
2499
  }
@@ -5417,7 +5430,7 @@ async function setupProxy(configProxy) {
5417
5430
  }
5418
5431
 
5419
5432
  // src/repl/dev-state.ts
5420
- import { existsSync as existsSync14, readFileSync as readFileSync8, writeFileSync as writeFileSync7, unlinkSync as unlinkSync2, mkdirSync as mkdirSync8 } from "fs";
5433
+ import { existsSync as existsSync14, readFileSync as readFileSync8, writeFileSync as writeFileSync7, unlinkSync as unlinkSync3, mkdirSync as mkdirSync8 } from "fs";
5421
5434
  import { join as join10 } from "path";
5422
5435
  import { homedir as homedir4 } from "os";
5423
5436
  var DEV_STATE_MAX_CHARS = 6e3;
@@ -5500,7 +5513,7 @@ function clearDevState() {
5500
5513
  const path = getDevStatePath();
5501
5514
  if (existsSync14(path)) {
5502
5515
  try {
5503
- unlinkSync2(path);
5516
+ unlinkSync3(path);
5504
5517
  } catch {
5505
5518
  }
5506
5519
  }
package/dist/index.js CHANGED
@@ -35,7 +35,7 @@ import {
35
35
  theme,
36
36
  truncateOutput,
37
37
  undoStack
38
- } from "./chunk-NJTTV277.js";
38
+ } from "./chunk-PAFT2NH5.js";
39
39
  import {
40
40
  AGENTIC_BEHAVIOR_GUIDELINE,
41
41
  AUTHOR,
@@ -55,7 +55,7 @@ import {
55
55
  REPO_URL,
56
56
  SKILLS_DIR_NAME,
57
57
  VERSION
58
- } from "./chunk-2FJISNUB.js";
58
+ } from "./chunk-HWYMXTIO.js";
59
59
 
60
60
  // src/index.ts
61
61
  import { program } from "commander";
@@ -1904,7 +1904,7 @@ ${hint}` : "")
1904
1904
  description: "Run project tests and show structured report",
1905
1905
  usage: "/test [command|filter]",
1906
1906
  async execute(args, _ctx) {
1907
- const { executeTests } = await import("./run-tests-KFMWOLRG.js");
1907
+ const { executeTests } = await import("./run-tests-VN4B3KBU.js");
1908
1908
  const argStr = args.join(" ").trim();
1909
1909
  let testArgs = {};
1910
1910
  if (argStr) {
@@ -5291,7 +5291,7 @@ program.command("web").description("Start Web UI server with browser-based chat
5291
5291
  console.error("Error: Invalid port number. Must be between 1 and 65535.");
5292
5292
  process.exit(1);
5293
5293
  }
5294
- const { startWebServer } = await import("./server-4HRRB4UM.js");
5294
+ const { startWebServer } = await import("./server-U6344DIP.js");
5295
5295
  await startWebServer({ port, host: options.host });
5296
5296
  });
5297
5297
  program.command("sessions").description("List recent conversation sessions").action(async () => {
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  executeTests,
4
4
  runTestsTool
5
- } from "./chunk-2FJISNUB.js";
5
+ } from "./chunk-HWYMXTIO.js";
6
6
  export {
7
7
  executeTests,
8
8
  runTestsTool
@@ -23,7 +23,7 @@ import {
23
23
  setupProxy,
24
24
  spawnAgentContext,
25
25
  truncateOutput
26
- } from "./chunk-NJTTV277.js";
26
+ } from "./chunk-PAFT2NH5.js";
27
27
  import {
28
28
  AGENTIC_BEHAVIOR_GUIDELINE,
29
29
  CONTEXT_FILE_CANDIDATES,
@@ -36,7 +36,7 @@ import {
36
36
  SKILLS_DIR_NAME,
37
37
  VERSION,
38
38
  __require
39
- } from "./chunk-2FJISNUB.js";
39
+ } from "./chunk-HWYMXTIO.js";
40
40
 
41
41
  // src/web/server.ts
42
42
  import express from "express";
@@ -34,7 +34,6 @@ const connectionStatus = document.getElementById('connection-status');
34
34
  const sidebar = document.getElementById('sidebar');
35
35
  const sessionListEl = document.getElementById('session-list');
36
36
  const btnNewSession = document.getElementById('btn-new-session');
37
- const sidebarToggle = document.getElementById('sidebar-toggle');
38
37
 
39
38
  // ── Configure marked.js ────────────────────────────────────────────
40
39
 
@@ -647,11 +646,6 @@ function renderSessionMessages(messages) {
647
646
  scrollToBottom();
648
647
  }
649
648
 
650
- // Sidebar toggle for mobile
651
- sidebarToggle.addEventListener('click', () => {
652
- sidebar.classList.toggle('sidebar-open');
653
- });
654
-
655
649
  // New session button
656
650
  btnNewSession.addEventListener('click', () => {
657
651
  send({ type: 'command', name: 'session', args: ['new'] });
@@ -59,9 +59,6 @@
59
59
  </div>
60
60
  </aside>
61
61
 
62
- <!-- Sidebar toggle (mobile) -->
63
- <button id="sidebar-toggle" class="btn btn-xs btn-ghost absolute top-[3.75rem] left-0 z-10 rounded-l-none" title="Toggle sidebar">☰</button>
64
-
65
62
  <!-- Chat Area -->
66
63
  <main id="chat-area" class="flex-1 overflow-y-auto px-4 py-4">
67
64
  <div id="messages" class="max-w-4xl mx-auto flex flex-col gap-3">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jinzd-ai-cli",
3
- "version": "0.1.78",
3
+ "version": "0.1.79",
4
4
  "description": "Cross-platform REPL-style AI CLI with multi-provider support",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",