termux-dev 1.9.2 → 1.9.3
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/assets/banner.svg +1 -1
- package/assets/preview.svg +1 -1
- package/dist/cli/transcript.js +2 -1
- package/dist/core/types.js +1 -1
- package/dist/tools/plan.js +43 -6
- package/package.json +1 -1
package/assets/banner.svg
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
<rect width="1000" height="280" fill="url(#bg)"/>
|
|
17
17
|
</g>
|
|
18
18
|
<rect x="1.5" y="1.5" width="997" height="277" rx="18" fill="none" stroke="#23252c" stroke-width="1.5"/>
|
|
19
|
-
<text x="500.0" y="70" text-anchor="middle" font-family="'Inter',system-ui,-apple-system,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif" font-size="13" font-weight="600" letter-spacing="5" fill="#7d8896">THE TERMINAL-NATIVE AI CODING AGENT<tspan dx="16" fill="#2fe3ee" font-weight="700">v1.9.
|
|
19
|
+
<text x="500.0" y="70" text-anchor="middle" font-family="'Inter',system-ui,-apple-system,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif" font-size="13" font-weight="600" letter-spacing="5" fill="#7d8896">THE TERMINAL-NATIVE AI CODING AGENT<tspan dx="16" fill="#2fe3ee" font-weight="700">v1.9.3</tspan></text>
|
|
20
20
|
<g>
|
|
21
21
|
<text x="500.0" y="178" text-anchor="middle" font-family="'JetBrains Mono','Fira Code','SF Mono',ui-monospace,Menlo,Consolas,'DejaVu Sans Mono',monospace" font-size="112" font-weight="800" letter-spacing="14" fill="#2fe3ee">DEVX</text>
|
|
22
22
|
</g>
|
package/assets/preview.svg
CHANGED
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
<rect x="595.2" y="574.0" width="243.2" height="19" fill="#000000"/>
|
|
33
33
|
<text x="44.8" y="62.0" class="t" fill="#b794f6">▌</text>
|
|
34
34
|
<text x="61.6" y="62.0" class="t b" fill="#f4f7fb">devx</text>
|
|
35
|
-
<text x="112.0" y="62.0" class="t" fill="#5f6b7a">v1.9.
|
|
35
|
+
<text x="112.0" y="62.0" class="t" fill="#5f6b7a">v1.9.3</text>
|
|
36
36
|
<text x="61.6" y="106.0" class="t" fill="#5f6b7a">model</text>
|
|
37
37
|
<text x="128.8" y="106.0" class="t" fill="#e5eaf1">deepseek-v4.1-flash · think high</text>
|
|
38
38
|
<text x="406.0" y="106.0" class="t" fill="#5f6b7a">/model</text>
|
package/dist/cli/transcript.js
CHANGED
|
@@ -4,6 +4,7 @@ import { renderMarkdown } from './markdown.js';
|
|
|
4
4
|
import { palette, renderPlanCard, renderResultLine, renderTaskCard, renderToolLine, renderUserEcho, summarizeToolResult } from './ui.js';
|
|
5
5
|
import { displayWidth, truncateWidth, wrapText } from './width.js';
|
|
6
6
|
import { t } from '../core/i18n.js';
|
|
7
|
+
import { toStringList } from '../tools/plan.js';
|
|
7
8
|
const MAX_ECHO_LINES = 300;
|
|
8
9
|
/** What /compact puts in front of the summary it keeps as the first message. */
|
|
9
10
|
export const COMPACT_MARK = '[CONVERSATION COMPACTED]';
|
|
@@ -16,7 +17,7 @@ export function toolResultRows(name, result, opts) {
|
|
|
16
17
|
if (parsed.type === 'todo_list' && Array.isArray(parsed.tasks) && parsed.tasks.length > 0)
|
|
17
18
|
return renderTaskCard(parsed.tasks, cols);
|
|
18
19
|
if (parsed.type === 'plan_ready' && typeof parsed.summary === 'string')
|
|
19
|
-
return renderPlanCard({ summary: parsed.summary, files: parsed.files, steps: parsed.steps }, cols);
|
|
20
|
+
return renderPlanCard({ summary: parsed.summary, files: toStringList(parsed.files), steps: toStringList(parsed.steps) }, cols);
|
|
20
21
|
if (parsed.action === 'edit' && parsed.diffLines) {
|
|
21
22
|
const box = formatDiffBox(parsed.path, parsed.diffLines, Math.min(cols - 4, 80), undefined, !!opts.diffColors);
|
|
22
23
|
const rows = box.split('\n').map((l) => ' ' + l);
|
package/dist/core/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const DEVX_VERSION = '1.9.
|
|
1
|
+
export const DEVX_VERSION = '1.9.3';
|
package/dist/tools/plan.js
CHANGED
|
@@ -2,6 +2,35 @@ export let lastPlanReady = null;
|
|
|
2
2
|
export function resetPlanReady() {
|
|
3
3
|
lastPlanReady = null;
|
|
4
4
|
}
|
|
5
|
+
/**
|
|
6
|
+
* Weaker models send `steps` / `files` as one string (numbered lines, a JSON array in text) or put
|
|
7
|
+
* other things in the list. Accept those forms so the plan card is never lost to a shape mismatch.
|
|
8
|
+
*/
|
|
9
|
+
export function toStringList(value) {
|
|
10
|
+
let items;
|
|
11
|
+
if (Array.isArray(value)) {
|
|
12
|
+
items = value;
|
|
13
|
+
}
|
|
14
|
+
else if (typeof value === 'string') {
|
|
15
|
+
const text = value.trim();
|
|
16
|
+
if (!text)
|
|
17
|
+
return [];
|
|
18
|
+
let parsed;
|
|
19
|
+
if (text.startsWith('[')) {
|
|
20
|
+
try {
|
|
21
|
+
parsed = JSON.parse(text);
|
|
22
|
+
}
|
|
23
|
+
catch { }
|
|
24
|
+
}
|
|
25
|
+
items = Array.isArray(parsed) ? parsed : text.split('\n').map((line) => line.replace(/^\s*(?:\d+[.)]|[-*•])\s+/, ''));
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
return [];
|
|
29
|
+
}
|
|
30
|
+
return items
|
|
31
|
+
.map((item) => (typeof item === 'string' ? item : item == null ? '' : typeof item === 'object' ? JSON.stringify(item) : String(item)).trim())
|
|
32
|
+
.filter(Boolean);
|
|
33
|
+
}
|
|
5
34
|
export const planReadyTool = {
|
|
6
35
|
name: 'plan_ready',
|
|
7
36
|
definition: {
|
|
@@ -32,21 +61,29 @@ export const planReadyTool = {
|
|
|
32
61
|
if (!args || typeof args !== 'object') {
|
|
33
62
|
throw new Error('Arguments must be an object');
|
|
34
63
|
}
|
|
64
|
+
// Without a summary nothing can be drawn: say so, so the model calls it again instead of
|
|
65
|
+
// believing the plan was shown.
|
|
66
|
+
if (typeof args.summary !== 'string' || !args.summary.trim()) {
|
|
67
|
+
throw new Error("'summary' is required: a string with a 1-2 sentence summary of the plan. Call plan_ready again with 'summary', 'files' (array of strings) and 'steps' (array of strings).");
|
|
68
|
+
}
|
|
35
69
|
},
|
|
36
70
|
execute: async (args) => {
|
|
71
|
+
const summary = args.summary.trim();
|
|
72
|
+
const files = toStringList(args.files);
|
|
73
|
+
const steps = toStringList(args.steps);
|
|
37
74
|
lastPlanReady = {
|
|
38
|
-
summary
|
|
39
|
-
files:
|
|
40
|
-
steps:
|
|
75
|
+
summary,
|
|
76
|
+
files: files.length > 0 ? files : undefined,
|
|
77
|
+
steps: steps.length > 0 ? steps : undefined,
|
|
41
78
|
timestamp: Date.now()
|
|
42
79
|
};
|
|
43
80
|
// JSON: devx draws it as the plan card; the model reads the same data.
|
|
44
81
|
return JSON.stringify({
|
|
45
82
|
type: 'plan_ready',
|
|
46
83
|
status: 'shown to the user, who approves it or asks for changes',
|
|
47
|
-
summary
|
|
48
|
-
...(
|
|
49
|
-
...(
|
|
84
|
+
summary,
|
|
85
|
+
...(files.length > 0 ? { files } : {}),
|
|
86
|
+
...(steps.length > 0 ? { steps } : {}),
|
|
50
87
|
});
|
|
51
88
|
}
|
|
52
89
|
};
|
package/package.json
CHANGED