jinzd-ai-cli 0.1.73 → 0.1.74
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/dist/{chunk-ABXJS3XB.js → chunk-37AZXVX2.js} +1 -1
- package/dist/{chunk-FEYESHOP.js → chunk-WRFXLV34.js} +1 -1
- package/dist/index.js +4 -4
- package/dist/{run-tests-MYRF47LA.js → run-tests-IJDQJJ3N.js} +1 -1
- package/dist/{server-AAP2OMDQ.js → server-4LKAYB5Y.js} +2 -2
- package/dist/web/client/app.js +41 -30
- package/dist/web/client/style.css +29 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
theme,
|
|
35
35
|
truncateOutput,
|
|
36
36
|
undoStack
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-37AZXVX2.js";
|
|
38
38
|
import {
|
|
39
39
|
AGENTIC_BEHAVIOR_GUIDELINE,
|
|
40
40
|
AUTHOR,
|
|
@@ -54,7 +54,7 @@ import {
|
|
|
54
54
|
REPO_URL,
|
|
55
55
|
SKILLS_DIR_NAME,
|
|
56
56
|
VERSION
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-WRFXLV34.js";
|
|
58
58
|
|
|
59
59
|
// src/index.ts
|
|
60
60
|
import { program } from "commander";
|
|
@@ -1903,7 +1903,7 @@ ${hint}` : "")
|
|
|
1903
1903
|
description: "Run project tests and show structured report",
|
|
1904
1904
|
usage: "/test [command|filter]",
|
|
1905
1905
|
async execute(args, _ctx) {
|
|
1906
|
-
const { executeTests } = await import("./run-tests-
|
|
1906
|
+
const { executeTests } = await import("./run-tests-IJDQJJ3N.js");
|
|
1907
1907
|
const argStr = args.join(" ").trim();
|
|
1908
1908
|
let testArgs = {};
|
|
1909
1909
|
if (argStr) {
|
|
@@ -5290,7 +5290,7 @@ program.command("web").description("Start Web UI server with browser-based chat
|
|
|
5290
5290
|
console.error("Error: Invalid port number. Must be between 1 and 65535.");
|
|
5291
5291
|
process.exit(1);
|
|
5292
5292
|
}
|
|
5293
|
-
const { startWebServer } = await import("./server-
|
|
5293
|
+
const { startWebServer } = await import("./server-4LKAYB5Y.js");
|
|
5294
5294
|
await startWebServer({ port, host: options.host });
|
|
5295
5295
|
});
|
|
5296
5296
|
program.command("sessions").description("List recent conversation sessions").action(async () => {
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
runHook,
|
|
22
22
|
spawnAgentContext,
|
|
23
23
|
truncateOutput
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-37AZXVX2.js";
|
|
25
25
|
import {
|
|
26
26
|
AGENTIC_BEHAVIOR_GUIDELINE,
|
|
27
27
|
DEFAULT_MAX_TOKENS,
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
PLAN_MODE_SYSTEM_ADDON,
|
|
33
33
|
SKILLS_DIR_NAME,
|
|
34
34
|
VERSION
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-WRFXLV34.js";
|
|
36
36
|
|
|
37
37
|
// src/web/server.ts
|
|
38
38
|
import express from "express";
|
package/dist/web/client/app.js
CHANGED
|
@@ -139,20 +139,22 @@ function handleResponseDone(msg) {
|
|
|
139
139
|
}
|
|
140
140
|
|
|
141
141
|
function handleToolCallStart(msg) {
|
|
142
|
-
const
|
|
143
|
-
: msg.dangerLevel === 'write' ? '
|
|
142
|
+
const levelBorder = msg.dangerLevel === 'destructive' ? 'tool-border-destructive'
|
|
143
|
+
: msg.dangerLevel === 'write' ? 'tool-border-write' : 'tool-border-safe';
|
|
144
144
|
const levelIcon = msg.dangerLevel === 'destructive' ? '⚠'
|
|
145
145
|
: msg.dangerLevel === 'write' ? '✎' : '⚙';
|
|
146
|
+
const levelBadge = msg.dangerLevel === 'destructive' ? 'badge-error'
|
|
147
|
+
: msg.dangerLevel === 'write' ? 'badge-warning' : 'badge-info';
|
|
146
148
|
|
|
147
149
|
const el = document.createElement('div');
|
|
148
150
|
el.id = `tool-${msg.callId}`;
|
|
149
|
-
el.className = `tool-card
|
|
151
|
+
el.className = `tool-card ${levelBorder} my-1`;
|
|
150
152
|
el.innerHTML = `
|
|
151
|
-
<div class="flex items-center gap-2 w-full">
|
|
152
|
-
<span class="
|
|
153
|
-
<span class="
|
|
153
|
+
<div class="flex items-center gap-2 w-full mb-1">
|
|
154
|
+
<span class="badge ${levelBadge} badge-sm gap-1">${levelIcon} ${escapeHtml(msg.toolName)}</span>
|
|
155
|
+
<span class="text-xs opacity-50">${msg.round}/${msg.totalRounds}</span>
|
|
154
156
|
</div>
|
|
155
|
-
<div class="tool-args
|
|
157
|
+
<div class="tool-args w-full">${formatToolArgs(msg.args)}</div>
|
|
156
158
|
`;
|
|
157
159
|
messagesEl.appendChild(el);
|
|
158
160
|
scrollToBottom();
|
|
@@ -172,14 +174,17 @@ function handleToolCallResult(msg) {
|
|
|
172
174
|
function handleConfirmRequest(msg) {
|
|
173
175
|
const isDestructive = msg.dangerLevel === 'destructive';
|
|
174
176
|
const el = document.createElement('div');
|
|
175
|
-
el.className = `
|
|
177
|
+
el.className = `confirm-card ${isDestructive ? 'tool-border-destructive' : 'tool-border-write'} my-1`;
|
|
176
178
|
el.setAttribute('data-request-id', msg.requestId);
|
|
177
179
|
el.innerHTML = `
|
|
178
|
-
<div class="
|
|
180
|
+
<div class="flex items-center gap-2 mb-2">
|
|
181
|
+
<span class="badge ${isDestructive ? 'badge-error' : 'badge-warning'} badge-sm">${isDestructive ? '⚠ DESTRUCTIVE' : '✎ Write'}</span>
|
|
182
|
+
<span class="text-sm font-semibold">${escapeHtml(msg.toolName)}</span>
|
|
183
|
+
</div>
|
|
179
184
|
${msg.diff ? `<div class="confirm-diff w-full">${escapeHtml(msg.diff)}</div>` : ''}
|
|
180
|
-
<div class="flex gap-2 mt-
|
|
181
|
-
<button class="btn btn-success btn-sm" onclick="respondConfirm('${msg.requestId}', true)">✓ Approve</button>
|
|
182
|
-
<button class="btn btn-error btn-sm" onclick="respondConfirm('${msg.requestId}', false)">✗ Deny</button>
|
|
185
|
+
<div class="flex gap-2 mt-2">
|
|
186
|
+
<button class="btn btn-success btn-sm btn-outline" onclick="respondConfirm('${msg.requestId}', true)">✓ Approve</button>
|
|
187
|
+
<button class="btn btn-error btn-sm btn-outline" onclick="respondConfirm('${msg.requestId}', false)">✗ Deny</button>
|
|
183
188
|
</div>
|
|
184
189
|
`;
|
|
185
190
|
messagesEl.appendChild(el);
|
|
@@ -188,7 +193,7 @@ function handleConfirmRequest(msg) {
|
|
|
188
193
|
|
|
189
194
|
function handleBatchConfirmRequest(msg) {
|
|
190
195
|
const el = document.createElement('div');
|
|
191
|
-
el.className = '
|
|
196
|
+
el.className = 'confirm-card tool-border-write my-1 batch-confirm';
|
|
192
197
|
el.setAttribute('data-request-id', msg.requestId);
|
|
193
198
|
|
|
194
199
|
const fileListHtml = msg.files.map(f => `
|
|
@@ -199,11 +204,14 @@ function handleBatchConfirmRequest(msg) {
|
|
|
199
204
|
`).join('');
|
|
200
205
|
|
|
201
206
|
el.innerHTML = `
|
|
202
|
-
<div class="
|
|
207
|
+
<div class="flex items-center gap-2 mb-2">
|
|
208
|
+
<span class="badge badge-warning badge-sm">✎ Batch writes</span>
|
|
209
|
+
<span class="text-sm">${msg.files.length} files</span>
|
|
210
|
+
</div>
|
|
203
211
|
<div class="w-full my-1">${fileListHtml}</div>
|
|
204
|
-
<div class="flex gap-2 mt-
|
|
205
|
-
<button class="btn btn-success btn-sm" onclick="respondBatchConfirm('${msg.requestId}', this)">✓ Approve Selected</button>
|
|
206
|
-
<button class="btn btn-error btn-sm" onclick="respondBatchDeny('${msg.requestId}', this)">✗ Reject All</button>
|
|
212
|
+
<div class="flex gap-2 mt-2">
|
|
213
|
+
<button class="btn btn-success btn-sm btn-outline" onclick="respondBatchConfirm('${msg.requestId}', this)">✓ Approve Selected</button>
|
|
214
|
+
<button class="btn btn-error btn-sm btn-outline" onclick="respondBatchDeny('${msg.requestId}', this)">✗ Reject All</button>
|
|
207
215
|
</div>
|
|
208
216
|
`;
|
|
209
217
|
messagesEl.appendChild(el);
|
|
@@ -212,10 +220,13 @@ function handleBatchConfirmRequest(msg) {
|
|
|
212
220
|
|
|
213
221
|
function handleAskUserRequest(msg) {
|
|
214
222
|
const el = document.createElement('div');
|
|
215
|
-
el.className = '
|
|
223
|
+
el.className = 'confirm-card tool-border-safe my-1';
|
|
216
224
|
el.innerHTML = `
|
|
217
|
-
<div class="
|
|
218
|
-
|
|
225
|
+
<div class="flex items-center gap-2 mb-2">
|
|
226
|
+
<span class="badge badge-info badge-sm">❓ Question</span>
|
|
227
|
+
</div>
|
|
228
|
+
<div class="text-sm mb-2">${escapeHtml(msg.question)}</div>
|
|
229
|
+
<div class="flex gap-2 w-full">
|
|
219
230
|
<input type="text" id="ask-input-${msg.requestId}"
|
|
220
231
|
class="input input-sm input-bordered flex-1"
|
|
221
232
|
placeholder="Your answer..."
|
|
@@ -287,8 +298,8 @@ window.respondConfirm = function(requestId, approved) {
|
|
|
287
298
|
send({ type: 'confirm_response', requestId, approved });
|
|
288
299
|
const el = document.querySelector(`[data-request-id="${requestId}"]`);
|
|
289
300
|
if (el) {
|
|
290
|
-
el.className = `
|
|
291
|
-
el.innerHTML = `<span class="text-sm">${approved ? '✓ Approved' : '✗ Denied'}</span>`;
|
|
301
|
+
el.className = `confirm-card ${approved ? 'tool-border-safe' : 'tool-border-destructive'} my-1 opacity-60`;
|
|
302
|
+
el.innerHTML = `<span class="text-sm ${approved ? 'text-success' : 'text-error'}">${approved ? '✓ Approved' : '✗ Denied'}</span>`;
|
|
292
303
|
}
|
|
293
304
|
};
|
|
294
305
|
|
|
@@ -305,24 +316,24 @@ window.respondBatchConfirm = function(requestId, btn) {
|
|
|
305
316
|
} else {
|
|
306
317
|
send({ type: 'batch_confirm_response', requestId, decision: selected });
|
|
307
318
|
}
|
|
308
|
-
dialog.className = '
|
|
309
|
-
dialog.innerHTML = `<span class="text-sm">✓ Approved ${selected.length}/${checks.length} files</span>`;
|
|
319
|
+
dialog.className = 'confirm-card tool-border-safe my-1 opacity-60';
|
|
320
|
+
dialog.innerHTML = `<span class="text-sm text-success">✓ Approved ${selected.length}/${checks.length} files</span>`;
|
|
310
321
|
};
|
|
311
322
|
|
|
312
323
|
window.respondBatchDeny = function(requestId, btn) {
|
|
313
324
|
send({ type: 'batch_confirm_response', requestId, decision: 'none' });
|
|
314
325
|
const dialog = btn.closest('.batch-confirm');
|
|
315
|
-
dialog.className = '
|
|
316
|
-
dialog.innerHTML = `<span class="text-sm">✗ All rejected</span>`;
|
|
326
|
+
dialog.className = 'confirm-card tool-border-destructive my-1 opacity-60';
|
|
327
|
+
dialog.innerHTML = `<span class="text-sm text-error">✗ All rejected</span>`;
|
|
317
328
|
};
|
|
318
329
|
|
|
319
330
|
window.respondAskUser = function(requestId) {
|
|
320
331
|
const input = document.getElementById(`ask-input-${requestId}`);
|
|
321
332
|
const answer = input ? input.value : '';
|
|
322
333
|
send({ type: 'ask_user_response', requestId, answer: answer || null });
|
|
323
|
-
const dialog = input?.closest('.
|
|
334
|
+
const dialog = input?.closest('.confirm-card');
|
|
324
335
|
if (dialog) {
|
|
325
|
-
dialog.className = '
|
|
336
|
+
dialog.className = 'confirm-card tool-border-safe my-1 opacity-60';
|
|
326
337
|
dialog.innerHTML = `<span class="text-sm">↪ ${escapeHtml(answer || '(cancelled)')}</span>`;
|
|
327
338
|
}
|
|
328
339
|
};
|
|
@@ -360,8 +371,8 @@ function addInfoMessage(text) {
|
|
|
360
371
|
|
|
361
372
|
function addErrorMessage(text) {
|
|
362
373
|
const el = document.createElement('div');
|
|
363
|
-
el.className = '
|
|
364
|
-
el.innerHTML = `<span
|
|
374
|
+
el.className = 'error-message my-1';
|
|
375
|
+
el.innerHTML = `<span class="text-error text-sm">⚠ ${escapeHtml(text)}</span>`;
|
|
365
376
|
messagesEl.appendChild(el);
|
|
366
377
|
scrollToBottom();
|
|
367
378
|
}
|
|
@@ -110,16 +110,25 @@
|
|
|
110
110
|
50% { opacity: 0; }
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
/* ── Tool call cards
|
|
113
|
+
/* ── Tool call cards (base-colored with left border) ── */
|
|
114
114
|
.tool-card {
|
|
115
|
+
background: oklch(var(--b2));
|
|
116
|
+
border-radius: 0.5rem;
|
|
117
|
+
padding: 0.75rem 1rem;
|
|
115
118
|
font-size: 0.85rem;
|
|
119
|
+
border-left: 3px solid transparent;
|
|
116
120
|
}
|
|
121
|
+
.tool-border-safe { border-left-color: oklch(var(--in)); }
|
|
122
|
+
.tool-border-write { border-left-color: oklch(var(--wa)); }
|
|
123
|
+
.tool-border-destructive { border-left-color: oklch(var(--er)); }
|
|
124
|
+
|
|
117
125
|
.tool-card .tool-args {
|
|
118
126
|
white-space: pre-wrap;
|
|
119
127
|
max-height: 100px;
|
|
120
128
|
overflow-y: auto;
|
|
121
129
|
font-size: 0.8rem;
|
|
122
|
-
opacity: 0.
|
|
130
|
+
opacity: 0.65;
|
|
131
|
+
line-height: 1.5;
|
|
123
132
|
}
|
|
124
133
|
.tool-card .tool-result-content {
|
|
125
134
|
white-space: pre-wrap;
|
|
@@ -128,12 +137,20 @@
|
|
|
128
137
|
font-size: 0.8rem;
|
|
129
138
|
}
|
|
130
139
|
|
|
131
|
-
/* ── Confirm
|
|
140
|
+
/* ── Confirm / ask-user card ────────────────────────── */
|
|
141
|
+
.confirm-card {
|
|
142
|
+
background: oklch(var(--b2));
|
|
143
|
+
border-radius: 0.5rem;
|
|
144
|
+
padding: 0.75rem 1rem;
|
|
145
|
+
border-left: 3px solid transparent;
|
|
146
|
+
}
|
|
147
|
+
|
|
132
148
|
.confirm-diff {
|
|
133
149
|
background: oklch(var(--b3));
|
|
150
|
+
color: oklch(var(--bc));
|
|
134
151
|
padding: 0.5rem;
|
|
135
152
|
border-radius: 0.375rem;
|
|
136
|
-
font-family: 'Fira Code', 'Consolas', monospace;
|
|
153
|
+
font-family: 'Fira Code', 'JetBrains Mono', 'Consolas', monospace;
|
|
137
154
|
font-size: 0.78rem;
|
|
138
155
|
white-space: pre-wrap;
|
|
139
156
|
max-height: 200px;
|
|
@@ -141,6 +158,14 @@
|
|
|
141
158
|
margin-bottom: 0.5rem;
|
|
142
159
|
}
|
|
143
160
|
|
|
161
|
+
/* ── Error message ──────────────────────────────────── */
|
|
162
|
+
.error-message {
|
|
163
|
+
background: oklch(var(--er) / 0.1);
|
|
164
|
+
border-left: 3px solid oklch(var(--er));
|
|
165
|
+
border-radius: 0.5rem;
|
|
166
|
+
padding: 0.5rem 1rem;
|
|
167
|
+
}
|
|
168
|
+
|
|
144
169
|
/* ── Thinking block ─────────────────────────────────── */
|
|
145
170
|
.thinking-block summary {
|
|
146
171
|
cursor: pointer;
|