@lazyingart/agintiflow 0.20.15 → 0.20.17
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/demos/agintiflow-cli-launch.jpg +0 -0
- package/package.json +1 -1
- package/public/index.html +6 -3
- package/public/styles.css +62 -2
- package/scripts/smoke-cli-chat.js +8 -0
- package/src/interactive-cli.js +33 -10
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lazyingart/agintiflow",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.17",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "AgInTiFlow is a web-first coding agent and CLI with DeepSeek routing, sandboxed tools, model providers, canvas artifacts, and optional wrappers.",
|
|
6
6
|
"license": "Apache-2.0",
|
package/public/index.html
CHANGED
|
@@ -36,10 +36,13 @@
|
|
|
36
36
|
<p class="subtle" data-i18n="intro">
|
|
37
37
|
Browser agent with provider selection, resumable runs, persisted settings, and an optional guarded shell tool with Docker sandbox support.
|
|
38
38
|
</p>
|
|
39
|
-
<
|
|
40
|
-
<
|
|
39
|
+
<details class="project-card">
|
|
40
|
+
<summary>
|
|
41
|
+
<strong data-i18n="projectStatusTitle">Project folder</strong>
|
|
42
|
+
<span class="project-card-toggle" aria-hidden="true"></span>
|
|
43
|
+
</summary>
|
|
41
44
|
<p id="project-status" class="subtle">Loading project context...</p>
|
|
42
|
-
</
|
|
45
|
+
</details>
|
|
43
46
|
|
|
44
47
|
<section id="setup-card" class="setup-card" hidden>
|
|
45
48
|
<div>
|
package/public/styles.css
CHANGED
|
@@ -290,9 +290,7 @@ h1 {
|
|
|
290
290
|
|
|
291
291
|
.project-card,
|
|
292
292
|
.setup-card {
|
|
293
|
-
display: grid;
|
|
294
293
|
min-width: 0;
|
|
295
|
-
gap: 10px;
|
|
296
294
|
margin: 14px 0;
|
|
297
295
|
padding: 13px;
|
|
298
296
|
border: 1px solid rgba(15, 118, 110, 0.18);
|
|
@@ -300,11 +298,73 @@ h1 {
|
|
|
300
298
|
background: linear-gradient(135deg, rgba(204, 251, 241, 0.44), rgba(255, 247, 237, 0.9));
|
|
301
299
|
}
|
|
302
300
|
|
|
301
|
+
.setup-card {
|
|
302
|
+
display: grid;
|
|
303
|
+
gap: 10px;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
.project-card {
|
|
307
|
+
display: block;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
.project-card summary {
|
|
311
|
+
display: flex;
|
|
312
|
+
align-items: center;
|
|
313
|
+
justify-content: space-between;
|
|
314
|
+
gap: 12px;
|
|
315
|
+
min-width: 0;
|
|
316
|
+
list-style: none;
|
|
317
|
+
cursor: pointer;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
.project-card summary::-webkit-details-marker {
|
|
321
|
+
display: none;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
.project-card summary strong {
|
|
325
|
+
min-width: 0;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
.project-card summary:focus-visible {
|
|
329
|
+
border-radius: 10px;
|
|
330
|
+
outline: 3px solid rgba(15, 118, 110, 0.22);
|
|
331
|
+
outline-offset: 4px;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
.project-card-toggle {
|
|
335
|
+
display: inline-grid;
|
|
336
|
+
width: 30px;
|
|
337
|
+
height: 30px;
|
|
338
|
+
flex: 0 0 auto;
|
|
339
|
+
place-items: center;
|
|
340
|
+
border: 1px solid rgba(15, 118, 110, 0.22);
|
|
341
|
+
border-radius: 999px;
|
|
342
|
+
background: rgba(255, 253, 250, 0.78);
|
|
343
|
+
color: var(--accent);
|
|
344
|
+
font-size: 0.88rem;
|
|
345
|
+
font-weight: 900;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
.project-card-toggle::before {
|
|
349
|
+
content: "⌄";
|
|
350
|
+
transform: rotate(-90deg);
|
|
351
|
+
transition: transform 160ms ease;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
.project-card[open] .project-card-toggle::before {
|
|
355
|
+
transform: rotate(0deg);
|
|
356
|
+
}
|
|
357
|
+
|
|
303
358
|
.project-card p,
|
|
304
359
|
.setup-card p {
|
|
305
360
|
overflow-wrap: anywhere;
|
|
306
361
|
}
|
|
307
362
|
|
|
363
|
+
.project-card p {
|
|
364
|
+
margin: 10px 0 0;
|
|
365
|
+
line-height: 1.55;
|
|
366
|
+
}
|
|
367
|
+
|
|
308
368
|
.setup-card .key-links {
|
|
309
369
|
display: flex;
|
|
310
370
|
flex-wrap: wrap;
|
|
@@ -6,6 +6,7 @@ import path from "node:path";
|
|
|
6
6
|
import { fileURLToPath } from "node:url";
|
|
7
7
|
import {
|
|
8
8
|
buildLaunchHeaderLines,
|
|
9
|
+
formatCommittedUserPromptLines,
|
|
9
10
|
buildPromptLayout,
|
|
10
11
|
buildPromptRenderSequence,
|
|
11
12
|
canonicalSlashPromptBuffer,
|
|
@@ -173,6 +174,12 @@ try {
|
|
|
173
174
|
) {
|
|
174
175
|
throw new Error("terminal prompt layout did not render visual-only input padding safely");
|
|
175
176
|
}
|
|
177
|
+
const committedUserText = formatCommittedUserPromptLines("list files", 90)
|
|
178
|
+
.map((line) => line.replace(/\x1b\[[0-9;?]*[ -/]*[@-~]/g, ""))
|
|
179
|
+
.join("\n");
|
|
180
|
+
if (!committedUserText.includes("user> list files") || committedUserText.includes("cwd")) {
|
|
181
|
+
throw new Error("committed user history should not include the live cwd footer");
|
|
182
|
+
}
|
|
176
183
|
const zhPromptLayout = buildPromptLayout("", 0, 90, 24, { language: "zh-Hans", commandCwd: "/tmp/aginti-project" });
|
|
177
184
|
const zhPromptText = zhPromptLayout.renderedRows.map((line) => line.replace(/\x1b\[[0-9;?]*[ -/]*[@-~]/g, "")).join("\n");
|
|
178
185
|
if (!zhPromptText.includes("输入任务")) {
|
|
@@ -317,6 +324,7 @@ try {
|
|
|
317
324
|
"large-launch-header",
|
|
318
325
|
"prompt-layout",
|
|
319
326
|
"prompt-redraw-fast-path",
|
|
327
|
+
"committed-user-no-cwd-footer",
|
|
320
328
|
"cli-i18n",
|
|
321
329
|
"user-prompt-label",
|
|
322
330
|
"escape-policy",
|
package/src/interactive-cli.js
CHANGED
|
@@ -910,10 +910,30 @@ function renderPromptBuffer(buffer, cursor, previous = { lineCount: 0, cursorRow
|
|
|
910
910
|
};
|
|
911
911
|
}
|
|
912
912
|
|
|
913
|
-
function
|
|
914
|
-
const
|
|
915
|
-
|
|
916
|
-
|
|
913
|
+
export function formatCommittedUserPromptLines(text = "", width = terminalWidth()) {
|
|
914
|
+
const safeText = String(text || "");
|
|
915
|
+
const lineWidth = editorWidth(width);
|
|
916
|
+
const firstPrefix = labelText("user>", { prompt: true });
|
|
917
|
+
const nextPrefix = labelText("...", { prompt: true });
|
|
918
|
+
const rows = [];
|
|
919
|
+
const sourceLines = safeText.split(/\r?\n/);
|
|
920
|
+
|
|
921
|
+
for (const [lineIndex, sourceLine] of sourceLines.entries()) {
|
|
922
|
+
const prefix = lineIndex === 0 ? firstPrefix : nextPrefix;
|
|
923
|
+
const innerWidth = Math.max(lineWidth - prefix.length, 8);
|
|
924
|
+
const wrapped = wrapTextLine(sourceLine, innerWidth);
|
|
925
|
+
const chunks = wrapped.length > 0 ? wrapped : [""];
|
|
926
|
+
for (const [chunkIndex, chunk] of chunks.entries()) {
|
|
927
|
+
const rowPrefix = lineIndex === 0 && chunkIndex === 0 ? firstPrefix : nextPrefix;
|
|
928
|
+
rows.push(panelLine(`${rowPrefix}${chunk}`, ansi.userBg, lineWidth));
|
|
929
|
+
}
|
|
930
|
+
}
|
|
931
|
+
|
|
932
|
+
return rows.length > 0 ? rows : [panelLine(firstPrefix, ansi.userBg, lineWidth)];
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
function printCommittedUserInput(text = "") {
|
|
936
|
+
for (const line of formatCommittedUserPromptLines(text)) outputLine(line);
|
|
917
937
|
}
|
|
918
938
|
|
|
919
939
|
function lineBounds(buffer, cursor) {
|
|
@@ -973,6 +993,12 @@ function readTtyPrompt(options = {}) {
|
|
|
973
993
|
let suggestionAnchor = "";
|
|
974
994
|
let suggestionIndex = 0;
|
|
975
995
|
|
|
996
|
+
const clearPromptPanel = () => {
|
|
997
|
+
if (!rendered.lineCount) return;
|
|
998
|
+
clearRenderedPrompt(rendered);
|
|
999
|
+
rendered = { lineCount: 0, cursorRow: 0, renderedRows: [] };
|
|
1000
|
+
};
|
|
1001
|
+
|
|
976
1002
|
const cleanup = () => {
|
|
977
1003
|
if (redrawHandle) {
|
|
978
1004
|
clearImmediate(redrawHandle);
|
|
@@ -1012,10 +1038,9 @@ function readTtyPrompt(options = {}) {
|
|
|
1012
1038
|
buffer = canonical;
|
|
1013
1039
|
cursor = buffer.length;
|
|
1014
1040
|
}
|
|
1015
|
-
|
|
1016
|
-
moveToPromptBottom(rendered);
|
|
1041
|
+
clearPromptPanel();
|
|
1017
1042
|
cleanup();
|
|
1018
|
-
|
|
1043
|
+
printCommittedUserInput(buffer);
|
|
1019
1044
|
const saved = buffer.trim();
|
|
1020
1045
|
if (saved && promptHistory[promptHistory.length - 1] !== buffer) promptHistory.push(buffer);
|
|
1021
1046
|
resolve(buffer);
|
|
@@ -1078,10 +1103,8 @@ function readTtyPrompt(options = {}) {
|
|
|
1078
1103
|
|
|
1079
1104
|
const handler = (str = "", key = {}) => {
|
|
1080
1105
|
if (key.ctrl && key.name === "c") {
|
|
1081
|
-
|
|
1082
|
-
moveToPromptBottom(rendered);
|
|
1106
|
+
clearPromptPanel();
|
|
1083
1107
|
cleanup();
|
|
1084
|
-
output.write("\n");
|
|
1085
1108
|
reject(createAbortError());
|
|
1086
1109
|
return;
|
|
1087
1110
|
}
|