Skip to content

specs block use copilot button when default run config has tools#956

Merged
sfierro merged 2 commits intosfierro/specsfrom
sfierro/specs_block_copilot_tools
Jan 21, 2026
Merged

specs block use copilot button when default run config has tools#956
sfierro merged 2 commits intosfierro/specsfrom
sfierro/specs_block_copilot_tools

Conversation

@sfierro
Copy link
Contributor

@sfierro sfierro commented Jan 21, 2026

Summary by CodeRabbit

  • New Features

    • Kiln Copilot integration added to workflow selection with a "Connect Kiln Copilot" button and a "Create Manually" action.
    • Connect button is conditionally enabled based on the task's default run configuration.
  • Bug Fixes

    • Improved loading indicators and surfaced error messages for a clearer initialization flow and failure states.

✏️ Tip: You can customize this high-level summary in your review settings.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @sfierro, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request integrates a crucial compatibility check to prevent users from attempting to use Kiln Copilot with tasks that have tool-calling enabled in their default run configuration. Since Copilot does not yet support tool calling, these changes ensure a smoother user experience by disabling the Copilot option and providing clear guidance. The implementation involves adding a new utility to detect tool presence in run configurations and updating the UI components to reflect this limitation with proper loading and error handling.

Highlights

  • Copilot Button Disablement: The 'Connect Kiln Copilot' button is now disabled on the select workflow page if the task's default run configuration includes tools, providing a tooltip explanation for the user.
  • Tool Configuration Check: A new utility function, checkDefaultRunConfigHasTools, has been introduced to asynchronously determine if a task's default run configuration has any tools defined.
  • UI Loading and Error States: The select_workflow page now displays appropriate loading spinners and error messages while fetching task information and checking for tool configurations, improving user feedback.
  • Spec Builder Copilot Logic: The spec_builder page's logic for enabling Copilot has been updated to also consider whether the default run configuration has tools, ensuring consistency across the application.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 21, 2026

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

Adds async task loading and error handling to the workflow selection UI, introduces a utility to detect whether the task's default run config has tools, and surfaces Kiln Copilot connect controls (disabled when default config already has tools or while loading).

Changes

Cohort / File(s) Summary
Kiln Copilot workflow selection UI
app/web_ui/src/routes/(app)/specs/[project_id]/[task_id]/select_workflow/+page.svelte
Adds onMount async flow to load task, check default run-config tools, and manage loading/error state. Replaces static workflow table with conditional rendering and adds "Connect Kiln Copilot" (tooltip, disabled by loading or when tools exist) and "Create Manually" actions.
Spec builder Copilot enablement logic
app/web_ui/src/routes/(app)/specs/[project_id]/[task_id]/spec_builder/+page.svelte
Introduces default_run_config_has_tools state; fetches it on init via utility and requires it to be false for Copilot enablement.
Default run config tools check utility
app/web_ui/src/routes/(app)/specs/[project_id]/[task_id]/spec_utils.ts
Adds exported checkDefaultRunConfigHasTools(project_id, task): Promise<boolean> that validates IDs, loads run configs, locates the default run config, and returns whether it has tools. Adds related imports and store access.

Sequence Diagram(s)

sequenceDiagram
  participant User as User (Browser)
  participant UI as SelectWorkflow Page
  participant Utils as spec_utils.checkDefaultRunConfigHasTools
  participant API as Run Configs API / Store

  User->>UI: Open workflow selection page
  UI->>UI: set loading = true
  UI->>UI: load task (async)
  UI->>Utils: checkDefaultRunConfigHasTools(project_id, task)
  Utils->>API: fetch run configs for task
  API-->>Utils: return run configs
  Utils-->>UI: boolean default_run_config_has_tools
  UI->>UI: set loading = false / set error? / render UI
  alt default_run_config_has_tools == true
    UI->>User: show "Create Manually" (Copilot connect disabled)
  else
    UI->>User: show "Connect Kiln Copilot" (enabled)
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • scosman
  • leonardmq

Poem

🐰 I hopped in with async cheer and code so spry,
Checked run-configs under moonlit sky,
If tools are found, the Copilot stays shy,
Else I nudge a button — connect and fly! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description check ⚠️ Warning No pull request description was provided by the author, missing all required template sections including objectives, related issues, and checklists. Add a comprehensive PR description following the template: explain the goal, link related issues, confirm CLA agreement, and verify test checklists.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding Kiln Copilot button logic in specs block based on default run config tools.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

The pull request effectively implements the logic to disable the Kiln Copilot button when the default run configuration for a task includes tools, as tool calling is not yet supported by Kiln Copilot. This is achieved by introducing a new utility function checkDefaultRunConfigHasTools to determine if the default run configuration has tools, and then using this information to conditionally disable the button and display an informative tooltip. The changes are well-structured, utilizing Svelte's onMount lifecycle hook for asynchronous data fetching and reactive statements for UI updates. Error handling is also appropriately integrated.

@github-actions
Copy link

github-actions bot commented Jan 21, 2026

📊 Coverage Report

Overall Coverage: 92%

Diff: origin/sfierro/specs...HEAD

No lines with coverage information in this diff.


@sfierro sfierro merged commit 483f175 into sfierro/specs Jan 21, 2026
10 checks passed
@sfierro sfierro deleted the sfierro/specs_block_copilot_tools branch January 21, 2026 06:34
@coderabbitai coderabbitai bot mentioned this pull request Feb 11, 2026
2 tasks
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.

2 participants