Skip to content
This repository was archived by the owner on Jun 3, 2026. It is now read-only.

feat: quick-action buttons for one-click common replies - #106

Open
ShehabSherif0 wants to merge 1 commit into
jraylan:mainfrom
ShehabSherif0:feat/quick-action-buttons
Open

feat: quick-action buttons for one-click common replies#106
ShehabSherif0 wants to merge 1 commit into
jraylan:mainfrom
ShehabSherif0:feat/quick-action-buttons

Conversation

@ShehabSherif0

@ShehabSherif0 ShehabSherif0 commented Mar 2, 2026

Copy link
Copy Markdown
Contributor

This PR adds a quick-action button system above the response input for one-click common replies.

What it does

When the agent asks a question, a row of clickable buttons appears above the input box so users can reply in one click. The panel ships with no defaults - users configure their own labels via settings.

Changes

Quick-action buttons

Configurable one-click reply buttons rendered above the input on every agent question. All buttons use VS Code's native secondary button theming (--vscode-button-secondaryBackground/Foreground) and standard border-radius: 3px to blend naturally with the workbench.

A gear icon fades in on hover at the right of the row and opens the relevant settings entry on click.

Empty state

When no quick actions are configured (the default), a subtle "+ Add quick action" link is shown so users can easily discover and set up the feature without digging through settings manually.

Collapse toggle

A small chevron at the top-right of the panel collapses and expands the section with a smooth animation. The state is session-persistent. The panel can also be hidden globally via seamless-agent.showQuickActions.

New config settings

Setting Type Default Description
seamless-agent.quickActionDefaults string[] [] Labels for the quick-action buttons. Empty by default - add your own.
seamless-agent.showQuickActions boolean true Show or hide the entire quick-action panel

Design decisions

  • No parsed option detection: The model already provides structured options via the existing options path. Instead of adding a regex heuristic fallback to parse free-text lists, this PR focuses on the configurable quick-reply buttons which provide clear, predictable value.
  • No opinionated defaults: Ships with an empty array so the feature doesn't add noise for users who don't want it. The empty-state hint makes it trivially discoverable.
  • VS Code-native styling: Buttons use standard VS Code theme tokens and border-radius conventions, consistent with the surrounding workbench.

Testing

All 37 existing tests pass. TypeScript compiles clean (tsc --noEmit). Single clean commit.

Copilot AI review requested due to automatic review settings March 2, 2026 20:55
@iwangbowen

Copy link
Copy Markdown
Contributor

Thanks for this PR and the clear writeup! A couple of thoughts before we move forward:

The vivid semantic colors (green/amber/red) and large rounded button shapes feel out of place inside VS Code's panel. VS Code's own UI intentionally uses muted, low-contrast styling to keep the IDE focus on the user's code — bright, pill-shaped buttons can make the extension feel like a standalone web app rather than a native IDE component. I'd suggest leaning more on VS Code's token-based theming (e.g. --vscode-button-background, --vscode-button-foreground) and keeping border-radius closer to what the rest of the editor uses (typically 2–4px), so the panel blends naturally with the surrounding workbench.

@iwangbowen

Copy link
Copy Markdown
Contributor

I understand this PR layers the free-text list detection on top of the existing structured options path rather than replacing it. That said, I think it may be solving the wrong problem. We already instruct the model via our prompt conventions to return options as structured data whenever applicable, and it reliably does so in the vast majority of cases. Adding a heuristic fallback that tries to recover option groups from unstructured prose essentially works around a prompt compliance gap rather than closing it. If the model occasionally returns a numbered or lettered list instead of structured options when it should have used the structured format, the right fix is to tighten the prompt — make the instruction more explicit or add a concrete example — so the model consistently produces the expected output. A more reliable prompt is simpler, more maintainable, and degrades far more predictably than a regex-based text parser that may fire on content it was never meant to parse.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@jraylan

jraylan commented Mar 9, 2026

Copy link
Copy Markdown
Owner

I'm trying to better understand this feature. While it seems great, I'm also having trouble grasping exactly what problem it solves, since models can pass options now. I'll leave it open for now while I run tests.

@ShehabSherif0 ShehabSherif0 changed the title feat: quick-action buttons with multi-select, option grouping, and design polish feat: quick-action buttons for one-click common replies Mar 11, 2026
@ShehabSherif0
ShehabSherif0 force-pushed the feat/quick-action-buttons branch 3 times, most recently from 7fe5f4e to d181900 Compare March 11, 2026 12:38
@ShehabSherif0

Copy link
Copy Markdown
Contributor Author

@iwangbowen @jraylan Thanks for the feedback! I’ve reworked the PR based on your points:

Removed the parsed option detection entirely: you’re both right that it was solving the wrong problem. If the model skips structured options, the fix belongs in the prompt, not a regex fallback.

Switched to VS Code-native styling: buttons now use standard --vscode-button-secondaryBackground/Foreground with 3px border-radius. No more semantic colors or pill shapes. Also reverted the global button/input style overrides to keep things consistent with the workbench.

What remains is just the core: configurable one-click reply buttons (Continue / Stop / Rethink this) above the input with a collapse toggle and settings gear - a small quality-of-life improvement for common responses without adding complexity.

image

@iwangbowen

iwangbowen commented Mar 11, 2026

Copy link
Copy Markdown
Contributor

The reworked version looks great — this is exactly the kind of quality-of-life improvement that many users have been looking for. Having configurable one-click reply buttons with clean VS Code-native styling and a collapse toggle is a really thoughtful touch. Thanks for incorporating the feedback so thoroughly, @ShehabSherif0!

@ShehabSherif0
ShehabSherif0 force-pushed the feat/quick-action-buttons branch 2 times, most recently from 0b46155 to bbbf90e Compare March 11, 2026 13:44
@ShehabSherif0

Copy link
Copy Markdown
Contributor Author

### the default strings question:

right now quickActionDefaults ships with ["Continue", "Stop", "Rethink this"] as the out-of-the-box defaults.

Option A Keep defaults: Users see value immediately without any setup. The empty-state “Add quick action” hint is still there as a fallback.

Option B No defaults (empty array []): Ships clean/unopinionated. Users who want quick actions configure them themselves. The panel would immediately show the empty hint.

@iwangbowen

Copy link
Copy Markdown
Contributor

@ShehabSherif0 I prefer option B

@ShehabSherif0
ShehabSherif0 force-pushed the feat/quick-action-buttons branch from bbbf90e to 5af399c Compare March 11, 2026 14:30
@ShehabSherif0

ShehabSherif0 commented Mar 11, 2026

Copy link
Copy Markdown
Contributor Author

This version is cleaner.

image

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 7 comments.

Comments suppressed due to low confidence (1)

media/webview.html:195

  • The textarea no longer has an associated label (the label[for="response-input"] was removed). Placeholders aren’t a substitute for labels and this is an accessibility regression for screen readers. Consider restoring the label (can be visually hidden) or adding an aria-label/aria-labelledby that references visible text.
      <div class="response-section">

        <!-- Autocomplete dropdown - positioned above input container -->
        <div id="autocomplete-dropdown" class="autocomplete-dropdown hidden">
          <div class="autocomplete-header">
            <span class="codicon codicon-file"></span>
            <span>{{selectFile}}</span>
          </div>
          <div id="autocomplete-list" class="autocomplete-list"></div>
          <div id="autocomplete-empty" class="autocomplete-empty hidden">
            {{noFilesFound}}
          </div>
        </div>

        <!-- Resize handle for textarea -->
        <div class="resize-handle" id="resize-handle" title="{{dragToResize}}">
          <div class="resize-handle-grip"></div>
        </div>

        <!-- Modern input container with chips, attach icon, and textarea -->
        <div class="input-container">
          <!-- Chips bar (hidden when no attachments) -->
          <div id="chips-container" class="chips-container hidden"></div>

          <!-- Input area with attach button and textarea -->
          <div class="input-area">
            <!-- Attach button on the left -->
            <button type="button" id="attach-btn" class="attach-btn" title="{{addAttachment}}">
              <span class="codicon codicon-attach"></span>
            </button>

            <!-- Textarea wrapper -->
            <div class="textarea-wrapper">
              <textarea id="response-input" placeholder="{{inputPlaceholder}}" rows="1"></textarea>
            </div>
          </div>

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread package.nls.pt-br.json
Comment thread src/webview/main.ts
Comment thread src/webview/main.ts Outdated
Comment thread src/webview/main.ts
Comment thread src/webview/webviewProvider.ts Outdated
Comment thread media/webview.html Outdated
Comment thread package.nls.pt.json
Add configurable one-click quick-reply buttons (Continue, Stop,
Rethink this) above the response input when the agent asks a question.

Buttons use VS Code's native secondary button theming
(--vscode-button-secondaryBackground/Foreground) with standard
border-radius to blend naturally with the surrounding workbench.

- Collapse/expand toggle with session-persistent state
- Settings gear button to manage quick-action defaults
- New settings: quickActionDefaults (string[]) and showQuickActions (boolean)
- Config change listeners for live updates

All 37 tests pass, tsc --noEmit clean.
@ShehabSherif0
ShehabSherif0 force-pushed the feat/quick-action-buttons branch from 6300192 to 51ef222 Compare March 11, 2026 17:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants