ClipSpacesClipSpaces Docs
Back to app

All releases

AI thoughts, token counts & graceful context limits

Added

  • "Thoughts" dropdown on AI replies (Claude/GPT style). The model's reasoning — a provider's native reasoning channel when it has one, otherwise chain-of-thought that a verbose model (e.g. nemotron) leaked into the answer — is lifted out of the bubble into a collapsible disclosure instead of dumping raw planning inline. callModel now returns { text, reasoning?, usage?, truncated }; splitReasoning (lib/ai/actions.ts) separates answer from thoughts.
  • Per-message token badge — each assistant reply shows the tokens it consumed (input + output), next to the existing "scanned N cards / worked for Xs" meta.

Changed

  • Graceful context handling instead of gibberish. A pre-flight check returns a plain message ("this space is too large for <model>'s N-token window — switch to a larger-context model or your own key") when the window can't fit a usable board context. Truncated replies (finish_reason: length / stop_reason: max_tokens) now say the reply was cut off, rather than silently dropping the actions block.
  • Raised AI_CHAT_MAX_TOKENS default 1200 → 2000, and the board-actions spec now tells the model to emit the actions block first, so a long reply can't truncate the actions away.