Files
oh-my-pi/packages/coding-agent/test/plan-mode
roboomp ee442cedea fix(ask,plan): fix renderer crash and plan-mode exit loop for Qwen3 and similar models
- Guard renderInlineMarkdown against non-string input: partial JSON during
  streaming can leave option label fields as undefined, causing marked.lexer
  to throw 'undefined is not an object (evaluating e.replace)'. The ask tool
  renderer now silently falls back to an empty string or baseColor output.

- Sanitize normalizePlanTitle instead of hard-rejecting: models that produce
  natural-language plan titles like 'My Improvement Plan' were getting a
  ToolError on every resolve call, causing an infinite retry loop. Spaces are
  now converted to hyphens, remaining invalid chars are dropped, and only
  truly unresolvable titles (empty after sanitization, path separators) throw.

- Fix ask.md prompt example: the example showed the legacy single-question
  format (question/options/recommended at the top level) while the schema
  requires questions: [{id, question, options}]. Models that follow examples
  closely (Qwen3) generated calls that always failed schema validation.

Fixes #1176
2026-05-19 02:09:47 +00:00
..