Skip to content

Optimize accept all button display in AI chat #6001

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

claude[bot]
Copy link
Contributor

@claude claude bot commented Jun 19, 2025

Summary

  • Simplifies the logic for showing/hiding apply and accept all buttons in AI chat code suggestions
  • Replaces complex code comparison logic with simpler state-based approach
  • Hides buttons after "accept all" is clicked and shows them again when editor code changes

Changes

  • AIChatManager.svelte.ts: Added acceptAllClicked state and updated canApplyCode logic
  • CodeDisplay.svelte: Removed code comparison from button visibility condition
  • monaco-adapter.ts: Added state management for accept all clicks and editor changes

Behavior Changes

  • Before: Buttons showed when canApplyCode && code !== scriptEditorOptions?.code
  • After: Buttons hide after clicking "accept all" and reappear when editor content changes

Test Plan

  • Verify apply/accept all buttons appear for code suggestions in AI chat
  • Click "accept all" and verify buttons are hidden
  • Manually edit editor content and verify buttons reappear
  • Test with multiple code blocks in chat conversation

Fixes #5999

🤖 Generated with Claude Code

- Add acceptAllClicked state to AIChatManager to track when accept all was clicked
- Update canApplyCode logic to hide buttons after accept all is clicked
- Simplify CodeDisplay button visibility to remove code comparison logic
- Add editor change listener to reset state when user manually edits code
- Show buttons again when editor content changes as requested

Addresses issue #5999

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Ruben Fiszel <rubenfiszel@users.noreply.github.com>
Copy link

Deploying windmill with  Cloudflare Pages  Cloudflare Pages

Latest commit: d2b17a2
Status: ✅  Deploy successful!
Preview URL: https://3b2d1df4.windmill.pages.dev
Branch Preview URL: https://claude-issue-5999-20250619-1.windmill.pages.dev

View logs

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.

Optimize accept all button display in ai chat
0 participants