Skip to content

Add quick actions to editor chat, make DraftChatPanel view-agnostic#219

Merged
oandregal merged 3 commits into
trunkfrom
pensive-galileo-66b436
May 21, 2026
Merged

Add quick actions to editor chat, make DraftChatPanel view-agnostic#219
oandregal merged 3 commits into
trunkfrom
pensive-galileo-66b436

Conversation

@oandregal
Copy link
Copy Markdown
Contributor

Summary

  • Make DraftChatPanel view-agnostic. Replaced the isProjectView boolean with three explicit props — placeholder, quickActions, and welcomeText — so the component no longer knows which view it lives in. Callers decide what to show.
  • Add editor quick actions. The editor chat now shows "Make it shorter", "Improve clarity", and "Suggest a stronger opening" as quick-action buttons in the empty state, with a welcome message.
  • Fix source files showing project chat. Switched the condition from docKind to openResource so source files (not just drafts/done) get the editor chat variant.
  • Persist file card on quick-action messages. Quick actions explicitly attach the open file as a visible chat attachment so the reference survives navigation away from the file.
  • Remove "Summarize my sources" from the project-view quick actions.

Test plan

  • Open a draft → editor chat shows "How can I help with this?" + 3 action buttons
  • Open a source file → same editor chat (not project chat)
  • Open a done file → same editor chat
  • Click a quick action → file card appears in the user bubble
  • Navigate away from the file → file card persists in chat history
  • Project view (no file open) → shows "What would you like to write?" + project actions
  • Verify "Summarize my sources" is no longer in project actions

🤖 Generated with Claude Code

oandregal and others added 3 commits May 21, 2026 11:18
DraftChatPanel no longer knows which view it lives in. Instead of
the isProjectView boolean, callers pass placeholder, quickActions,
and welcomeText directly. The editor chat now shows "Make it
shorter", "Improve clarity", and "Suggest a stronger opening".

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Switch the chat variant check from docKind to openResource so
source files also get the editor placeholder, quick actions, and
welcome text. Remove draft-specific wording from the messages.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Quick actions now explicitly attach the open file as a visible
chat attachment so the reference survives navigation. Passes
openResource: null to composeChatMessage to avoid duplicating the
file in the agent prompt.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 21, 2026 09:29
@oandregal oandregal merged commit 7caa5ce into trunk May 21, 2026
1 check failed
@oandregal oandregal deleted the pensive-galileo-66b436 branch May 21, 2026 09:30
@oandregal oandregal review requested due to automatic review settings May 21, 2026 09:53
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