wormclaude 1.0.130 → 1.0.131

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.
@@ -206,16 +206,29 @@ export function recoverInlineToolCalls(text) {
206
206
  }
207
207
  }
208
208
  // 4) AskUserQuestion'ı JSON yerine DÜZ-METİN (prose) yazan model (abliterated):
209
- // AskUserQuestion question "X" with options [A · B · C] → gerçek çağrıya çevir.
209
+ // AskUserQuestion question "X" with options ["A","B"] | [A · B · C] → gerçek çağrıya çevir.
210
210
  if (!out.length && /AskUserQuestion/i.test(t)) {
211
- const m = t.match(/AskUserQuestion[\s\S]*?["“]([^"”]{3,}?)["”][\s\S]*?\[([^\]]+)\]/i);
211
+ const m = t.match(/AskUserQuestion[\s\S]*?["“]([^"”]{3,}?)["”][\s\S]*?(\[[\s\S]*?\])/i);
212
212
  if (m) {
213
213
  const question = m[1].trim();
214
- const options = m[2]
215
- .split(/\s*[·•|,/]\s*|\s{2,}/)
216
- .map((s) => s.trim().replace(/^["'“]|["'”]$/g, ''))
217
- .filter(Boolean)
218
- .map((label) => ({ label }));
214
+ let options = [];
215
+ // Önce gerçek JSON array dene (model çoğunlukla ["A","B/C","D"] yazıyor → "/" ile BÖLME).
216
+ const arr = safeJsonParse(m[2], null);
217
+ if (Array.isArray(arr)) {
218
+ options = arr
219
+ .map((x) => (typeof x === 'string' ? x.trim() : (x && (x.label || x.value || x.text) ? String(x.label || x.value || x.text).trim() : '')))
220
+ .filter(Boolean)
221
+ .map((label) => ({ label }));
222
+ }
223
+ // JSON değilse ayraçla böl ("·•|," ve 2+ boşluk — "/" YOK, "İşletme/Teknoloji" bölünmesin).
224
+ if (options.length < 2) {
225
+ options = m[2]
226
+ .replace(/^\[|\]$/g, '')
227
+ .split(/\s*[·•|,]\s*|\s{2,}/)
228
+ .map((s) => s.trim().replace(/^["'“]|["'”]$/g, ''))
229
+ .filter(Boolean)
230
+ .map((label) => ({ label }));
231
+ }
219
232
  if (options.length >= 2)
220
233
  push({ name: 'AskUserQuestion', arguments: { question, options } });
221
234
  }
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.130';
19
+ export const VERSION = '1.0.131';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wormclaude",
3
- "version": "1.0.130",
3
+ "version": "1.0.131",
4
4
  "description": "WormClaude CLI - uncensored security+code assistant (ink TUI, Claude-style)",
5
5
  "type": "module",
6
6
  "bin": {