Skip to content

Conversation

Patrick-Erichsen
Copy link
Collaborator

@Patrick-Erichsen Patrick-Erichsen commented Jul 2, 2025

Screenshots

Screenshot 2025-07-02 at 3 27 57 PM Screenshot 2025-07-02 at 3 27 14 PM

Summary by cubic

Added a "Generate rule" button and dialog that lets users create new coding rules from chat history, with support for different rule types and streaming rule generation.

  • New Features
    • "Generate rule" button in chat responses opens a dialog for rule creation.
    • Dialog guides users through entering a prompt, selecting rule type, and editing generated rules.
    • Rule generation uses chat history and streams results into the dialog.
    • Supports Always, Auto Attached, Agent Requested, and Manual rule types with clear descriptions and templates.

@Patrick-Erichsen Patrick-Erichsen requested a review from a team as a code owner July 2, 2025 22:27
@Patrick-Erichsen Patrick-Erichsen requested review from tomasz-stefaniak and removed request for a team July 2, 2025 22:27
Copy link

netlify bot commented Jul 2, 2025

Deploy Preview for continuedev canceled.

Name Link
🔨 Latest commit e7e3540
🔍 Latest deploy log https://app.netlify.com/projects/continuedev/deploys/686619a29f02d200081b3267

@dosubot dosubot bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label Jul 2, 2025
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

cubic found 7 issues across 19 files. Review them in cubic.dev

React with 👍 or 👎 to teach cubic. Tag @cubic-dev-ai to give specific feedback.

Copy link
Collaborator

@RomneyDa RomneyDa left a comment

Choose a reason for hiding this comment

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

  • alwaysApply could be confusing for the model (didn't we remove before because of this?). Instead, we could map the user-friendly names like agent requested to the tool args somehow
  • Button borders have looked a bit clanky, should we fix since this form has many?
  • the new llmStreamChat with tools adds surface area in a way that might be hard to work with in the future, e.g. won't work with virtual tools. We should combine into util

Copy link
Collaborator

@RomneyDa RomneyDa left a comment

Choose a reason for hiding this comment

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

Only show for native tool support models

@RomneyDa RomneyDa requested review from RomneyDa and removed request for tomasz-stefaniak July 3, 2025 00:26
Copy link
Collaborator

@RomneyDa RomneyDa left a comment

Choose a reason for hiding this comment

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

Should add the continue.generateRule command for jetbrains

@@ -13,7 +13,7 @@ export const createRuleBlock: Tool = {
function: {
name: BuiltInToolNames.CreateRuleBlock,
description:
'Creates a "rule" that can be referenced in future conversations. This should be used whenever you want to establish code standards / preferences that should be applied consistently, or when you want to avoid making a mistake again. To modify existing rules, use the edit tool instead.',
'Creates a "rule" that can be referenced in future conversations. This should be used whenever you want to establish code standards / preferences that should be applied consistently, or when you want to avoid making a mistake again. To modify existing rules, use the edit tool instead.\n\nRule Types:\n- Always: Include only "rule" (always included in model context)\n- Auto Attached: Include "rule", "globs", and/or "regex" (included when files match patterns)\n- Agent Requested: Include "rule" and "description" (AI decides when to apply based on description)\n- Manual: Include only "rule" (only included when explicitly mentioned using @ruleName)',
Copy link
Collaborator

Choose a reason for hiding this comment

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

change alwaysApply to a more readable "rule_type" arg

Copy link
Collaborator

Choose a reason for hiding this comment

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

@Patrick-Erichsen saving this change for later?

Copy link
Collaborator

Choose a reason for hiding this comment

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

nvm saw your comment


export const createRuleBlockImpl: ToolImpl = async (
args: CreateRuleBlockArgs,
{ name, rule, ...otherArgs }: CreateRuleBlockArgs,
Copy link
Collaborator

Choose a reason for hiding this comment

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

what is the advantage over saying otherArgs syntax vs just saying { name, rule, description }

Copy link
Collaborator

Choose a reason for hiding this comment

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

hahaha it had a good run

@github-project-automation github-project-automation bot moved this from Todo to In Progress in Issues and PRs Jul 3, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jul 3, 2025
@sestinj sestinj merged commit f92253c into main Jul 4, 2025
40 checks passed
@sestinj sestinj deleted the pe/rule-dialog branch July 4, 2025 01:07
@github-project-automation github-project-automation bot moved this from In Progress to Done in Issues and PRs Jul 4, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Jul 4, 2025
@sestinj
Copy link
Contributor

sestinj commented Jul 22, 2025

🎉 This PR is included in version 1.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm This PR has been approved by a maintainer released size:XXL This PR changes 1000+ lines, ignoring generated files.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants