Skip to content

feat(assistant-editor): tailor chat input controls for the preview#381

Merged
philmerrell merged 1 commit into
developfrom
feature/assistant-preview-chat-input-options
May 23, 2026
Merged

feat(assistant-editor): tailor chat input controls for the preview#381
philmerrell merged 1 commit into
developfrom
feature/assistant-preview-chat-input-options

Conversation

@philmerrell
Copy link
Copy Markdown
Contributor

Summary

  • Hide voice mode and the settings button in the assistant editor preview chat input — neither is wired into the editor — and expose file attachments so authors can test their assistant against the same inputs end users will send.
  • Wire fileUploadIds from the preview chat input through PreviewChatService to /chat/stream as file_upload_ids (mirrors the field name used by the main chat).
  • Split chat-input's settings button into its own showSettingsControl gate (previously coupled to showFileControls) and add a parallel showVoiceControl. Both threaded through ChatContainerConfig so all chat-input call sites can opt in/out independently.
  • Rename chat-input's hidden file <input> id to chat-input-file-upload to avoid colliding with the assistant form's existing knowledge-base file input (both previously used id="file-upload", which became a duplicate on the editor page once attachments were re-enabled in the preview).

Notable choices

  • KB and chat-input accept lists remain separate by intent: chat attachments include images and no .pptx; the KB upload includes .pptx and no images. Unifying them is a separate decision.
  • PreviewChatService.sendMessage gains a 4th optional fileUploadIds arg; the request body only adds file_upload_ids when files are present.

Test plan

  • Open an assistant in the editor — preview chat input shows the + attach button but no mic and no settings/sliders.
  • Attach an allowed file in the preview, send a question that references it, confirm the assistant response reflects the file contents (proves file_upload_ids made it through).
  • On /session (new chat), confirm all four controls remain visible: attach, settings, mic, send.
  • On the editor page, click the KB "Add content" upload and the preview's + separately — each opens with its own (different) accept list, no duplicate-id console warnings.

🤖 Generated with Claude Code

The assistant editor preview now hides voice mode and the settings button —
neither is wired to anything useful inside the editor — while exposing file
attachments so authors can test their assistant against the same inputs end
users will send. File uploads flow through the existing /chat/stream proxy
as file_upload_ids.

Splits the chat-input settings button into its own showSettingsControl gate
(previously coupled to showFileControls), adds a parallel showVoiceControl,
and threads both through ChatContainerConfig. Renames the chat-input file
input id to chat-input-file-upload to avoid colliding with the assistant
form's knowledge-base file input on the editor page.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@philmerrell philmerrell merged commit 2f937b1 into develop May 23, 2026
10 checks passed
@philmerrell philmerrell deleted the feature/assistant-preview-chat-input-options branch May 23, 2026 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant