zames_pro 2.82.141 → 2.83.0
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/CHANGELOG.md +12 -0
- package/README.md +19 -0
- package/dist/attachments.js +4 -7
- package/dist/backlog.js +2 -2
- package/dist/browser-pure.js +2 -2
- package/dist/commands.js +2 -2
- package/dist/compact.js +1 -1
- package/dist/config.js +10 -1
- package/dist/glm-browser.js +1 -1
- package/dist/glm-net-capture.js +1 -1
- package/dist/glm-ui.js +0 -20
- package/dist/hooks.js +1 -1
- package/dist/i18n/config.js +4 -0
- package/dist/index.js +24 -1
- package/dist/mcp.js +2 -2
- package/dist/qwen-browser.js +1 -1
- package/dist/qwen-ui.js +0 -2
- package/dist/run-task.js +1 -1
- package/dist/scheduler.js +1 -1
- package/dist/sessions.js +1 -1
- package/dist/spinner.js +1 -1
- package/dist/statusline.js +2 -2
- package/dist/subagent.js +3 -3
- package/dist/system-prompt.js +1 -1
- package/dist/theme.js +239 -37
- package/dist/tui/AskQuestion.js +2 -2
- package/dist/tui/ConfigMenu.js +7 -1
- package/dist/tui/FullScreenApp.js +11 -18
- package/dist/tui/InputLine.js +5 -4
- package/dist/tui/LogView.js +1 -1
- package/dist/tui/SelectList.js +1 -1
- package/dist/tui/StatusBar.js +10 -9
- package/dist/tui/TuiEditor.js +9 -0
- package/dist/tui/edit.js +1 -1
- package/dist/tui/layout.js +1 -1
- package/dist/tui/store.js +1 -0
- package/dist/tui/ui-colors.js +37 -0
- package/dist/tui/widgets.js +6 -41
- package/dist/web.js +1 -1
- package/dist/width.js +1 -1
- package/llms-full.txt +9 -0
- package/package.json +1 -1
- package/dist/code-blocks.js +0 -54
package/dist/tui/widgets.js
CHANGED
|
@@ -1,19 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
border: '#4a5058',
|
|
9
|
-
on: '#6fd0b0',
|
|
10
|
-
off: '#5b616e',
|
|
11
|
-
ok: '#a9c08c',
|
|
12
|
-
warn: '#c9a86a',
|
|
13
|
-
err: '#c98a80',
|
|
14
|
-
system: '#808896',
|
|
15
|
-
title: '#9fb8d8',
|
|
16
|
-
};
|
|
2
|
+
import { Text } from 'ink';
|
|
3
|
+
// The color map lives in ui-colors.ts because it is DERIVED from the active
|
|
4
|
+
// terminal palette and mutated in place on a /config theme switch. Re-exported
|
|
5
|
+
// here so every existing `import { UI } from './widgets.js'` keeps working.
|
|
6
|
+
export { UI } from './ui-colors.js';
|
|
7
|
+
import { UI } from './ui-colors.js';
|
|
17
8
|
/** `[x]` / `[ ]` — a checkbox for a boolean value. */
|
|
18
9
|
export function Checkbox({ checked, focused, }) {
|
|
19
10
|
return (_jsx(Text, { color: checked ? UI.on : UI.off, bold: focused, children: checked ? '[x]' : '[ ]' }));
|
|
@@ -23,33 +14,7 @@ export function Checkbox({ checked, focused, }) {
|
|
|
23
14
|
export function Select({ value, focused, }) {
|
|
24
15
|
return (_jsxs(Text, { children: [_jsx(Text, { color: UI.off, children: '‹ ' }), _jsx(Text, { color: focused ? UI.accent : UI.text, bold: focused, children: value }), _jsx(Text, { color: UI.off, children: ' ›' })] }));
|
|
25
16
|
}
|
|
26
|
-
/** A framed panel (rounded border) with an optional title bar and footer. */
|
|
27
|
-
export function Panel({ title, subtitle, footer, width, children, }) {
|
|
28
|
-
return (_jsxs(Box, { flexDirection: "column", borderStyle: "round", borderColor: UI.border, paddingX: 1, width: width, children: [title ? (_jsxs(Box, { justifyContent: "space-between", children: [_jsx(Text, { color: UI.title, bold: true, children: title }), subtitle ? _jsx(Text, { color: UI.dim, children: subtitle }) : null] })) : null, title ? (_jsx(Text, { color: "#3a3f4b", children: '─'.repeat(panelInnerCols(width)) })) : null, children, footer ? footer : null] }));
|
|
29
|
-
}
|
|
30
|
-
/** Inner width (minus border + paddingX) the panel divider should span. */
|
|
31
|
-
function panelInnerCols(width) {
|
|
32
|
-
const cols = width || process.stdout.columns || 80;
|
|
33
|
-
return Math.max(1, cols - 6);
|
|
34
|
-
}
|
|
35
|
-
/** A single hint chip: `↑/↓ select`. */
|
|
36
|
-
export function Hint({ keys, label, }) {
|
|
37
|
-
return (_jsxs(Text, { children: [_jsx(Text, { color: UI.accent, children: keys }), _jsx(Text, { color: UI.dim, children: ' ' + label })] }));
|
|
38
|
-
}
|
|
39
17
|
/** A row of hint chips separated by ` · `. */
|
|
40
18
|
export function HintBar({ hints, }) {
|
|
41
19
|
return (_jsx(Text, { children: hints.map(([k, l], i) => (_jsxs(Text, { children: [i > 0 ? _jsx(Text, { color: UI.dim, children: ' · ' }) : null, _jsx(Text, { color: UI.accent, children: k }), _jsx(Text, { color: UI.dim, children: ' ' + l })] }, i))) }));
|
|
42
20
|
}
|
|
43
|
-
/**
|
|
44
|
-
* A CODE BLOCK with a syntax-highlighted body and an optional title label.
|
|
45
|
-
*
|
|
46
|
-
* The agent's answers are printed as pre-rendered ANSI (markdown.ts already
|
|
47
|
-
* highlights with cli-highlight), so the live log does NOT use this component —
|
|
48
|
-
* it exists for menus/panels that show a snippet inline. No call site today:
|
|
49
|
-
* the Ctrl+Y / `/copy-code` feature that used it was removed, and plain `/copy`
|
|
50
|
-
* copies the whole answer, so `extractCodeBlocks` (src/code-blocks.ts) is only
|
|
51
|
-
* reached from its own tests.
|
|
52
|
-
*/
|
|
53
|
-
export function CodeBlock({ code, lang, highlighted, width, hint, focused, }) {
|
|
54
|
-
return (_jsxs(Box, { flexDirection: "column", borderStyle: "round", borderColor: focused ? UI.accent : UI.border, paddingX: 1, width: width, children: [_jsxs(Box, { justifyContent: "space-between", children: [_jsx(Text, { color: UI.dim, children: lang || 'code' }), hint ? _jsx(Text, { color: UI.accent, children: hint }) : null] }), (highlighted || code).split(String.fromCharCode(10)).map((line, i) => (_jsx(Text, { children: line || ' ' }, i)))] }));
|
|
55
|
-
}
|
package/dist/web.js
CHANGED
|
@@ -97,7 +97,7 @@ export function htmlToText(html) {
|
|
|
97
97
|
// accept) into a uint32, or null when it is not one. Rules: 1-4 parts; each
|
|
98
98
|
// part may be hex (0x…), octal (leading 0) or decimal; the LAST part fills all
|
|
99
99
|
// remaining bytes, so `127.1` == 127.0.0.1 and `2130706433` == 127.0.0.1.
|
|
100
|
-
|
|
100
|
+
function parseLegacyIpv4(host) {
|
|
101
101
|
const h = String(host || '').trim();
|
|
102
102
|
if (!h)
|
|
103
103
|
return null;
|
package/dist/width.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
// A longer line is harder to read and the eye loses the start of the next
|
|
9
9
|
// line on a wide terminal, so there is a cap.
|
|
10
10
|
// > 0 = an explicit cap (still never wider than the terminal).
|
|
11
|
-
|
|
11
|
+
const DEFAULT_CONTENT_WIDTH = 100;
|
|
12
12
|
let configured = 0;
|
|
13
13
|
/** Set the configured content width (0 or a non-positive value = auto). */
|
|
14
14
|
export function setContentWidth(width) {
|
package/llms-full.txt
CHANGED
|
@@ -605,6 +605,15 @@ right away (where possible without a restart).
|
|
|
605
605
|
(help, messages, spinner) and the language the agent answers you in. The
|
|
606
606
|
locale lives in `ui.locale` in the config file.
|
|
607
607
|
|
|
608
|
+
### Themes
|
|
609
|
+
|
|
610
|
+
`/config set ui.theme <id>` (or the `/config` menu, row «Terminal color theme»)
|
|
611
|
+
repaints the whole terminal in a different palette, live — no restart. `zames`
|
|
612
|
+
is the default; the bundled palettes are ports of well-known editor schemes:
|
|
613
|
+
|
|
614
|
+
`zames` (default), `one-dark`, `dracula`, `gruvbox`, `nord`, `monokai`,
|
|
615
|
+
`solarized-dark`, `tokyo-night`.
|
|
616
|
+
|
|
608
617
|
Agent data is stored in `~/.zames`: browser profile, logs, undo history, sessions.
|
|
609
618
|
|
|
610
619
|
## FAQ
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zames_pro",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.83.0",
|
|
4
4
|
"description": "Terminal coding agent that drives a real browser to chat with DeepSeek, Qwen or GLM — no API key required. Reads and edits files, runs commands, commits to git, like Claude Code / Codex CLI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
package/dist/code-blocks.js
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
// PURE extraction of fenced code blocks from a Markdown answer. It returns the
|
|
2
|
-
// RAW fenced text: the highlighted render is full of ANSI and must never be
|
|
3
|
-
// what gets copied out of the TUI.
|
|
4
|
-
/**
|
|
5
|
-
* Extract every fenced code block (``` or ~~~) from `md`, in order. Handles a
|
|
6
|
-
* longer closing fence than the opening one and an unterminated final block
|
|
7
|
-
* (the answer was truncated) — a half block is still copyable.
|
|
8
|
-
*/
|
|
9
|
-
export function extractCodeBlocks(md) {
|
|
10
|
-
const lines = String(md ?? '').split(String.fromCharCode(10));
|
|
11
|
-
const out = [];
|
|
12
|
-
let i = 0;
|
|
13
|
-
let n = 0;
|
|
14
|
-
while (i < lines.length) {
|
|
15
|
-
// The info string may contain a BACKTICK (CommonMark forbids it, models
|
|
16
|
-
// write it anyway: ```` ```ts` ````, ```` ```c++ `std::vector` ````). The
|
|
17
|
-
// old `[^`]*` rejected such a line, so the block's own CLOSING fence was
|
|
18
|
-
// read as an OPENING one and the following prose became a bogus block.
|
|
19
|
-
const m = /^(\s*)(`{3,}|~{3,})\s*(.*)$/.exec(lines[i]);
|
|
20
|
-
if (!m) {
|
|
21
|
-
i++;
|
|
22
|
-
continue;
|
|
23
|
-
}
|
|
24
|
-
// A BACKTICK fence cannot carry a backtick in its info (that is what makes
|
|
25
|
-
// it unparseable for CommonMark); treat the trailing text as prose after a
|
|
26
|
-
// plain fence only when the line is exactly a fence. For our purpose the
|
|
27
|
-
// pragmatic rule is: any trailing text is the language label, backticks
|
|
28
|
-
// stripped.
|
|
29
|
-
const fence = m[2];
|
|
30
|
-
const marker = fence[0];
|
|
31
|
-
const minLen = fence.length;
|
|
32
|
-
const lang = (m[3] || '').replace(/`/g, '').trim();
|
|
33
|
-
i++;
|
|
34
|
-
const body = [];
|
|
35
|
-
let closed = false;
|
|
36
|
-
while (i < lines.length) {
|
|
37
|
-
// A closing fence is the SAME marker, at least as long, with nothing
|
|
38
|
-
// else on the line (whitespace allowed).
|
|
39
|
-
const c = new RegExp('^\\s*' + marker + '{' + minLen + ',}\\s*$');
|
|
40
|
-
if (c.test(lines[i])) {
|
|
41
|
-
closed = true;
|
|
42
|
-
i++;
|
|
43
|
-
break;
|
|
44
|
-
}
|
|
45
|
-
body.push(lines[i]);
|
|
46
|
-
i++;
|
|
47
|
-
}
|
|
48
|
-
if (body.length === 0 && closed)
|
|
49
|
-
continue;
|
|
50
|
-
n++;
|
|
51
|
-
out.push({ lang, text: body.join(String.fromCharCode(10)), index: n });
|
|
52
|
-
}
|
|
53
|
-
return out;
|
|
54
|
-
}
|