continue-custom/packages
Patrick Erichsen e2e4f94e8d Add alwaysApply property to rules for better control over rule application
This commit introduces an optional `alwaysApply` boolean property to rules that provides fine-grained control over when rules are included in system messages.

## Behavior

- `alwaysApply: true` - Always include the rule, regardless of file context
- `alwaysApply: false` - Only include if globs exist AND match file context
- `alwaysApply: undefined` - Default behavior: include if no globs OR globs match

## Changes

- Added `alwaysApply?: boolean` to `RuleWithSource` interface
- Updated `parseMarkdownRule` to handle frontmatter `alwaysApply` property
- Enhanced `shouldApplyRule` function with explicit logic for all three states
- Added `alwaysApply` to createRuleBlock tool definition and implementation
- Updated UI logic in RulesPeek component to match backend behavior
- Added comprehensive test coverage for all scenarios
- Updated documentation to mention Markdown file support for rules

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-25 19:27:15 -07:00
..
config-types Merge pull request #4353 from Fmstrat/ollama-num-gpu 2025-04-29 12:59:54 -07:00
config-yaml Add alwaysApply property to rules for better control over rule application 2025-05-25 19:27:15 -07:00
continue-sdk Update package.json 2025-05-04 20:43:55 -07:00
fetch bump fetch version 2025-05-19 16:42:17 -07:00
hub update listAssistants 2025-04-04 17:04:13 -07:00
llm-info token-counts 2025-04-09 10:06:20 -07:00
openai-adapters Merge branch 'main' into dallin/cancelable-apply 2025-05-25 16:11:53 -07:00