specs block use copilot button when default run config has tools#956
specs block use copilot button when default run config has tools#956sfierro merged 2 commits intosfierro/specsfrom
Conversation
Summary of ChangesHello @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
🧠 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 AssistThe 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
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 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
|
|
Note Other AI code review bot(s) detectedCodeRabbit 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. WalkthroughAdds 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
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
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
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. Comment |
There was a problem hiding this comment.
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.
app/web_ui/src/routes/(app)/specs/[project_id]/[task_id]/select_workflow/+page.svelte
Show resolved
Hide resolved
app/web_ui/src/routes/(app)/specs/[project_id]/[task_id]/spec_utils.ts
Outdated
Show resolved
Hide resolved
📊 Coverage ReportOverall Coverage: 92% Diff: origin/sfierro/specs...HEADNo lines with coverage information in this diff.
|
Summary by CodeRabbit
New Features
Bug Fixes
✏️ Tip: You can customize this high-level summary in your review settings.