wormclaude 1.0.149 → 1.0.150

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 CHANGED
@@ -89,6 +89,41 @@ export function bannerAnsi(cols) {
89
89
  const line = paint(leftPlain, theme.greyDim) + gap + star + paint(' By ' + sign + ' ', theme.greyDim) + star;
90
90
  return body + '\n' + line;
91
91
  }
92
+ // Kod satırını karakter-bazlı sert sarar (uzun satır terminale taşıp kenarlığı bozmasın).
93
+ function hardChunks(s, width) {
94
+ if (width < 4)
95
+ width = 4;
96
+ if (s.length <= width)
97
+ return [s];
98
+ const out = [];
99
+ for (let i = 0; i < s.length; i += width)
100
+ out.push(s.slice(i, i + width));
101
+ return out;
102
+ }
103
+ // Sözdizimi-vurgulu kod satırını (token'lar) genişliğe göre sarar — renkleri koruyarak.
104
+ function wrapTokens(toks, width) {
105
+ if (width < 4)
106
+ width = 4;
107
+ const lines = [];
108
+ let line = '', col = 0;
109
+ for (const tk of toks) {
110
+ let s = tk.text;
111
+ while (s.length > 0) {
112
+ const take = s.slice(0, Math.max(1, width - col));
113
+ line += paint(take, tk.color);
114
+ col += take.length;
115
+ s = s.slice(take.length);
116
+ if (col >= width) {
117
+ lines.push(line);
118
+ line = '';
119
+ col = 0;
120
+ }
121
+ }
122
+ }
123
+ if (line || lines.length === 0)
124
+ lines.push(line);
125
+ return lines;
126
+ }
92
127
  // ── Markdown bloğu → ANSI (kod blokları sözdizimi-vurgulu) ──
93
128
  export function markdownAnsi(text, cols) {
94
129
  const W = Math.max(20, cols - 2);
@@ -97,17 +132,21 @@ export function markdownAnsi(text, cols) {
97
132
  let inCode = false, fence = '', lang = '', code = [];
98
133
  const fenceRe = /^ *(`{3,}|~{3,}) *(\w*)? *$/;
99
134
  const flushCode = () => {
135
+ const codeW = Math.max(8, W - 2); // '│ ' kenarlığı 2 sütun → kod genişliği = W-2
100
136
  if (lang)
101
137
  out.push(paint(' ' + lang, theme.greyDim));
102
138
  if (isHighlightable(lang)) {
103
139
  for (const toks of highlight(code.join('\n'), lang)) {
104
- out.push(paint('│ ', theme.greyDim) + (toks.length ? toks.map((tk) => paint(tk.text, tk.color)).join('') : ' '));
140
+ const segs = toks.length ? wrapTokens(toks, codeW) : [' '];
141
+ for (const sl of segs)
142
+ out.push(paint('│ ', theme.greyDim) + (sl || ' '));
105
143
  }
106
144
  }
107
145
  else {
108
146
  // Dilsiz/düz-metin blok: çubuk + nötr renk, sözdizimi-vurgusu YOK (saçma renk olmaz).
109
147
  for (const ln of code)
110
- out.push(paint('│ ', theme.greyDim) + paint(ln || ' ', theme.grey));
148
+ for (const sl of hardChunks(ln || ' ', codeW))
149
+ out.push(paint('│ ', theme.greyDim) + paint(sl || ' ', theme.grey));
111
150
  }
112
151
  code = [];
113
152
  lang = '';
package/dist/theme.js CHANGED
@@ -16,4 +16,4 @@ export const theme = {
16
16
  synType: '#a78bfa', // tip/sınıf adları, sabitler
17
17
  synProp: '#e0e0e0', // özellik/anahtar adları
18
18
  };
19
- export const VERSION = '1.0.149';
19
+ export const VERSION = '1.0.150';
package/dist/tui.js CHANGED
@@ -246,6 +246,7 @@ export async function runTui() {
246
246
  }
247
247
  // ── Footer'ı rezerve alanın DİBİNE çiz; rezerve alanın geri kalanını boşalt (eski menü kalmaz). ──
248
248
  function drawFooter() {
249
+ setRegion(); // scroll-region'ı her çizimde yeniden ata — bazı terminaller (conhost) sıfırlıyor → footer kayıyordu
249
250
  const W = Math.max(8, cols());
250
251
  const R = rows(), FM = FOOTER_MAX();
251
252
  const line = paint('─'.repeat(W), theme.red);
package/package.json CHANGED
@@ -1,50 +1,50 @@
1
- {
2
- "name": "wormclaude",
3
- "version": "1.0.149",
4
- "description": "WormClaude CLI - uncensored security+code assistant (ink TUI, Claude-style)",
5
- "type": "module",
6
- "bin": {
7
- "wormclaude": "dist/cli.js"
8
- },
9
- "scripts": {
10
- "dev": "tsx src/cli.tsx",
11
- "build": "node scripts/sync-version.mjs && tsc && node scripts/copy-skills.mjs && node scripts/copy-extensions.mjs",
12
- "start": "node dist/cli.js",
13
- "prepublishOnly": "npm run build"
14
- },
15
- "dependencies": {
16
- "@modelcontextprotocol/sdk": "^1.29.0",
17
- "@types/diff": "^7.0.2",
18
- "diff": "^9.0.0",
19
- "ink": "^5.0.1",
20
- "ink-spinner": "^5.0.0",
21
- "ink-text-input": "^6.0.0",
22
- "log-update": "^5.0.1",
23
- "react": "^18.3.1",
24
- "string-width": "^7.2.0"
25
- },
26
- "devDependencies": {
27
- "@types/node": "^22.10.2",
28
- "@types/react": "^18.3.18",
29
- "tsx": "^4.19.2",
30
- "typescript": "^5.7.2"
31
- },
32
- "files": [
33
- "dist",
34
- "skills",
35
- "extensions",
36
- "README.md"
37
- ],
38
- "engines": {
39
- "node": ">=18"
40
- },
41
- "license": "UNLICENSED",
42
- "keywords": [
43
- "wormclaude",
44
- "cli",
45
- "ai",
46
- "assistant",
47
- "agent",
48
- "terminal"
49
- ]
50
- }
1
+ {
2
+ "name": "wormclaude",
3
+ "version": "1.0.150",
4
+ "description": "WormClaude CLI - uncensored security+code assistant (ink TUI, Claude-style)",
5
+ "type": "module",
6
+ "bin": {
7
+ "wormclaude": "dist/cli.js"
8
+ },
9
+ "scripts": {
10
+ "dev": "tsx src/cli.tsx",
11
+ "build": "node scripts/sync-version.mjs && tsc && node scripts/copy-skills.mjs && node scripts/copy-extensions.mjs",
12
+ "start": "node dist/cli.js",
13
+ "prepublishOnly": "npm run build"
14
+ },
15
+ "dependencies": {
16
+ "@modelcontextprotocol/sdk": "^1.29.0",
17
+ "@types/diff": "^7.0.2",
18
+ "diff": "^9.0.0",
19
+ "ink": "^5.0.1",
20
+ "ink-spinner": "^5.0.0",
21
+ "ink-text-input": "^6.0.0",
22
+ "log-update": "^5.0.1",
23
+ "react": "^18.3.1",
24
+ "string-width": "^7.2.0"
25
+ },
26
+ "devDependencies": {
27
+ "@types/node": "^22.10.2",
28
+ "@types/react": "^18.3.18",
29
+ "tsx": "^4.19.2",
30
+ "typescript": "^5.7.2"
31
+ },
32
+ "files": [
33
+ "dist",
34
+ "skills",
35
+ "extensions",
36
+ "README.md"
37
+ ],
38
+ "engines": {
39
+ "node": ">=18"
40
+ },
41
+ "license": "UNLICENSED",
42
+ "keywords": [
43
+ "wormclaude",
44
+ "cli",
45
+ "ai",
46
+ "assistant",
47
+ "agent",
48
+ "terminal"
49
+ ]
50
+ }