unsloth/studio/frontend/src/features/chat
Lee Jackson ba0cae1aff
Stop: drop Ollama API key, clean up code execution UI (#5464)
* chat: drop Ollama API key, clean up code execution UI

* studio/chat: fix undefined candidateId + keyboard a11y on container list

- Auto-bind effect referenced `candidateId`, which is not declared in
  this scope (only `candidate` is) — would fail the TS/Next build.
  Use `candidate.id` to match the variable that's actually defined.
- Container list items get `role="button"` when `canActivate` is true
  but had no keyboard activation. Add `onKeyDown` for Enter/Space and
  `tabIndex={0}` so the row is focusable and activatable from the
  keyboard, matching the existing onClick behavior.

* studio/chat: restore declarations dropped by the main merge

The 75646444d auto-merge with main (#5466) silently dropped the
declarations a4f19171c added in regions #5466 also rewrote, while
leaving the usages further down in the file. No textual conflict
markers, but the result referenced undeclared names:

- REFRESH_POLL_MS constant (drives the 30s list refresh interval).
- pendingDelete / setPendingDelete / deleting / setDeleting state
  (drives the in-sheet AlertDialog delete confirm — replaces the
  window.confirm() that landed via #5466).
- Per-row locals inside the container list .map callback: running,
  isActive (recomputed with running), ttlMinutes, canActivate,
  statusLabel (drive click-to-activate, expired/active badges, and
  the muted styling for expired containers).

Also wire setDeleting(false) + setPendingDelete(null) into the
confirmDelete finally so the AlertDialog closes after the delete
call resolves; previously the busy state never cleared.

The all-containers list now iterates sortedContainers (matches the
picker above and the "newest-active first" UX) instead of the
unsorted visibleContainers.

---------

Co-authored-by: Roland Tannous <115670425+rolandtannous@users.noreply.github.com>
Co-authored-by: Roland Tannous <rolandtannous@gravityq.ai>
2026-05-16 02:17:03 +04:00
..
api studio/chat: OpenAI container picker delete reliability (#5466) 2026-05-16 01:53:13 +04:00
components Stop: drop Ollama API key, clean up code execution UI (#5464) 2026-05-16 02:17:03 +04:00
hooks studio: API external provider support for chat (OpenAI, Mistral, Gemini, Cohere, Anthropic, OpenRouter, DeepSeek, custom providers) (#4706) 2026-05-14 16:13:59 +04:00
lib studio/chat: built-in code execution for OpenAI + Anthropic (#5461) 2026-05-15 23:39:06 +04:00
presets Studio: Dark theme refactor, right sidebar redesign, and chat UI polish (#5150) 2026-05-07 14:33:31 +04:00
stores studio/chat: built-in code execution for OpenAI + Anthropic (#5461) 2026-05-15 23:39:06 +04:00
tour [Studio] Show non exported models in chat UI (#4892) 2026-04-14 15:03:58 +04:00
types studio/chat: built-in code execution for OpenAI + Anthropic (#5461) 2026-05-15 23:39:06 +04:00
utils studio: API external provider support for chat (OpenAI, Mistral, Gemini, Cohere, Anthropic, OpenRouter, DeepSeek, custom providers) (#4706) 2026-05-14 16:13:59 +04:00
api-provider-logo.tsx Polish/cloud to providers (#5450) 2026-05-15 19:29:21 +04:00
chat-page.tsx studio/chat: built-in code execution for OpenAI + Anthropic (#5461) 2026-05-15 23:39:06 +04:00
chat-providers-dialog.tsx Stop: drop Ollama API key, clean up code execution UI (#5464) 2026-05-16 02:17:03 +04:00
chat-settings-sheet.tsx studio/chat: built-in code execution for OpenAI + Anthropic (#5461) 2026-05-15 23:39:06 +04:00
db.ts studio: fix chat CPU spike (#4632) 2026-03-27 06:20:26 +00:00
external-providers.ts studio/chat: OpenAI container picker delete reliability (#5466) 2026-05-16 01:53:13 +04:00
index.ts Studio: Dark theme refactor, right sidebar redesign, and chat UI polish (#5150) 2026-05-07 14:33:31 +04:00
provider-capabilities.ts studio/chat: built-in code execution for OpenAI + Anthropic (#5461) 2026-05-15 23:39:06 +04:00
runtime-provider.tsx studio/chat: built-in code execution for OpenAI + Anthropic (#5461) 2026-05-15 23:39:06 +04:00
shared-composer.tsx studio/chat: built-in code execution for OpenAI + Anthropic (#5461) 2026-05-15 23:39:06 +04:00
thread-sidebar.tsx feat(studio): replace navbar with collapsible sidebar (#4936) 2026-04-16 08:46:16 -07:00
types.ts studio/chat: built-in code execution for OpenAI + Anthropic (#5461) 2026-05-15 23:39:06 +04:00