Roo-Code/webview-ui
Hannes Rudolph 0fdbd392e8
Migrate conversation continuity to plugin-side encrypted reasoning items (Responses API) (#9203)
* Migrate conversation continuity to plugin-side encrypted reasoning items (Responses API)

Summary
We moved continuity off OpenAI servers and now maintain conversation state locally by persisting and replaying encrypted reasoning items. Requests are stateless (store=false) while retaining the performance/caching benefits of the Responses API.

Why
This aligns with how Roo manages context and simplifies our Responses API implementation while keeping all the benefits of continuity, caching, and latency improvements.

What changed
- All OpenAI models now use the Responses API; system instructions are passed via the top-level instructions field; requests include store=false and include=["reasoning.encrypted_content"].
- We persist encrypted reasoning items (type: "reasoning", encrypted_content, optional id) into API history and replay them on subsequent turns.
- Reasoning summaries default to summary: "auto" when supported; text.verbosity only when supported.
- Atomic persistence via safeWriteJson.

Removed
- previous_response_id flows, suppressPreviousResponseId/skipPrevResponseIdOnce, persistGpt5Metadata(), and GPT‑5 response ID metadata in UI messages.

Kept
- taskId and mode metadata for cross-provider features.

Result
- ZDR-friendly, stateless continuity with equal or better performance and a simpler codepath.

* fix(webview): remove unused metadata prop from ReasoningBlock render

* Responses API: retain response id for troubleshooting (not continuity)

Continuity is stateless via encrypted reasoning items that we persist and replay. We now capture the top-level response id in OpenAiNativeHandler and persist the assistant message id into api_conversation_history.json solely for debugging/correlation with provider logs; it is not used for continuity or control flow.

Also: silence request-body debug logging to avoid leaking prompts.

* remove DEPRECATED tests

* chore: remove unused Task types file to satisfy knip CI

* fix(task): properly type cleanConversationHistory and createMessage args in Task to address Dan's review
2025-11-12 19:50:24 -05:00
..
audio feat: move play audio to webview to ensure cross-platform (#3659) 2025-05-20 01:15:05 -04:00
public Remove CRA cruft 2025-01-30 14:38:41 -08:00
src Migrate conversation continuity to plugin-side encrypted reasoning items (Responses API) (#9203) 2025-11-12 19:50:24 -05:00
.gitignore PR cleanup 2025-03-12 11:23:06 -04:00
components.json Remove lucide 2025-01-30 14:47:59 -08:00
eslint.config.mjs Preserve model settings when selecting a specific OpenRouter provider (#3915) 2025-05-23 23:22:41 -07:00
index.html Fix linter warning + run prettier on everything (#3581) 2025-05-13 15:16:24 -07:00
package.json feat(chat): Improve diff appearance in main chat view (#8932) 2025-11-06 16:18:01 -05:00
tsconfig.json Move @roo-code/cloud to the Roo-Code repo (#7503) 2025-08-28 11:18:45 -07:00
turbo.json Improve turbo task dependency declarations (#4323) 2025-06-04 09:32:27 -07:00
vite.config.ts Move @roo-code/cloud to the Roo-Code repo (#7503) 2025-08-28 11:18:45 -07:00
vitest.config.ts Show console logging in vitests when the --no-silent flag is set (#7467) 2025-08-28 12:51:21 -04:00
vitest.setup.ts Show console logging in vitests when the --no-silent flag is set (#7467) 2025-08-28 12:51:21 -04:00