wormclaude 1.0.44 → 1.0.46
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/ansi.js +4 -4
- package/dist/theme.js +1 -1
- package/dist/tui.js +19 -11
- package/package.json +1 -1
package/dist/ansi.js
CHANGED
|
@@ -145,17 +145,17 @@ export function itemAnsi(it, cols) {
|
|
|
145
145
|
if (it.kind === 'banner')
|
|
146
146
|
return '\n' + bannerAnsi(cols);
|
|
147
147
|
if (it.kind === 'user') {
|
|
148
|
-
// Kenarlıksız (kutu, küçültünce bozuluyordu) — sadece "
|
|
149
|
-
const body = wrap(it.text || '', W - 2).map((ln, i) => (i === 0 ? paint('
|
|
148
|
+
// Kenarlıksız (kutu, küçültünce bozuluyordu) — sadece "✶ metin", resize'da temiz sarılır.
|
|
149
|
+
const body = wrap(it.text || '', W - 2).map((ln, i) => (i === 0 ? paint('✶ ', theme.greyDim, true) : ' ') + paint(ln, theme.white));
|
|
150
150
|
return '\n' + body.join('\n');
|
|
151
151
|
}
|
|
152
152
|
if (it.kind === 'assistant') {
|
|
153
153
|
const md = markdownAnsi(it.text || '', cols).split('\n');
|
|
154
|
-
return '\n' + md.map((ln, i) => (i === 0 ? paint('
|
|
154
|
+
return '\n' + md.map((ln, i) => (i === 0 ? paint('✶ ', theme.redBright, true) + ln : ' ' + ln)).join('\n');
|
|
155
155
|
}
|
|
156
156
|
if (it.kind === 'tool') {
|
|
157
157
|
const n = (it.result || '').split('\n').length, chars = (it.result || '').length;
|
|
158
|
-
const head = paint('
|
|
158
|
+
const head = paint('✶ ', theme.redBright, true) + paint(it.label || '', theme.white);
|
|
159
159
|
const sub = paint(' ⎿ ', theme.greyDim) + (it.ok
|
|
160
160
|
? paint(`${n} ${t('common.lines') || 'satır'} (${chars})`, theme.grey)
|
|
161
161
|
: paint('✗ ' + (it.result || '').slice(0, 160), theme.errorRed));
|
package/dist/theme.js
CHANGED
package/dist/tui.js
CHANGED
|
@@ -39,6 +39,7 @@ function fit(line, max) {
|
|
|
39
39
|
return out + RESET;
|
|
40
40
|
}
|
|
41
41
|
const vis = (s) => stringWidth(s.replace(/\x1b\[[0-9;]*m/g, ''));
|
|
42
|
+
const padVis = (s, w) => s + ' '.repeat(Math.max(0, w - vis(s))); // görünür genişliğe boşluk doldur
|
|
42
43
|
export async function runTui() {
|
|
43
44
|
const config = loadConfig();
|
|
44
45
|
let account = { plan: '', email: '', name: '' };
|
|
@@ -93,19 +94,26 @@ export async function runTui() {
|
|
|
93
94
|
busy = false;
|
|
94
95
|
drawFooter();
|
|
95
96
|
}
|
|
96
|
-
// ──
|
|
97
|
+
// ── İkonlu, 2-sütunlu bilgi başlığı (3 sol / 3 sağ) — responsive ──
|
|
97
98
|
function headerLines(W) {
|
|
98
99
|
const ctx = (Number(process.env.WORMCLAUDE_CTX) || 12288).toLocaleString('tr-TR');
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
['
|
|
102
|
-
['
|
|
100
|
+
// [ikon, etiket, değer, renk]
|
|
101
|
+
const L = [
|
|
102
|
+
['◈', 'Version', 'v' + VERSION, theme.red],
|
|
103
|
+
['◆', 'Model', config.model, theme.redBright],
|
|
104
|
+
['★', 'Plan', (account.plan || '—').toUpperCase(), theme.white],
|
|
103
105
|
];
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
106
|
+
const R = [
|
|
107
|
+
['◉', 'Account', account.email || '—', theme.grey],
|
|
108
|
+
['◷', 'Context', ctx + ' tokens', theme.grey],
|
|
109
|
+
['▸', 'Workspace', process.cwd(), theme.grey],
|
|
110
|
+
];
|
|
111
|
+
const cell = ([ic, lb, val, col]) => ' ' + paint(ic + ' ', theme.red) + paint(lb.padEnd(11), theme.greyDim) + paint(val, col);
|
|
112
|
+
// Sol sütun genişliği = en uzun sol hücre + 4 boşluk (sağ sütun yakın dursun, çok açılmasın).
|
|
113
|
+
const colW = Math.max(...L.map((r) => vis(cell(r)))) + 4;
|
|
114
|
+
if (W < colW + 30)
|
|
115
|
+
return [...L, ...R].map((r) => fit(cell(r), W)); // dar ekran → alt alta
|
|
116
|
+
return [0, 1, 2].map((i) => fit(padVis(cell(L[i]), colW) + cell(R[i]), W)); // geniş → 2 sütun
|
|
109
117
|
}
|
|
110
118
|
// ── Scroll region: üst = içerik (kayar), alt = sabit footer ──
|
|
111
119
|
function setRegion() {
|
|
@@ -130,7 +138,7 @@ export async function runTui() {
|
|
|
130
138
|
const avail = W - 3;
|
|
131
139
|
if (vis(shown) > avail)
|
|
132
140
|
shown = '…' + shown.slice(-(avail - 1));
|
|
133
|
-
const inputLine = paint('
|
|
141
|
+
const inputLine = paint('✶ ', theme.redBright, true) + paint(shown, theme.white) + paint('▌', theme.greyDim);
|
|
134
142
|
// Durum satırı KUTUNUN ÜSTÜNDE: slash menü > spinner > ipucu.
|
|
135
143
|
const m = cmdMatches();
|
|
136
144
|
let status;
|