Commit graph

28 commits

Author SHA1 Message Date
Patrick Erichsen
c1a47858f3
fix: rule colocation uri logic (#7164)
* fix: rule colocation uri logic

* rename to `fileUri`

* fix: type errors

* fix test mocks

* Update slugs.test.ts
2025-08-15 10:00:17 -07:00
Dallin Romney
5b2e545ca1
Codebase/Colocated Rules Cache (#6603)
* codebase rules cache

* reload config on codebase rule update

* void codebase rule promise

* void rules cache promises part 2

* better colocated rule source label
2025-07-17 11:34:28 -07:00
chezsmithy
e4b08ff805 fix: 🐛 The edit rules button doesn't open the rule file 2025-07-02 17:06:30 -07:00
Nate Sesti
e310b0634e
Merge pull request #6138 from continuedev/pe/rule-updates-2
feat: move rule parsing to `config-yaml`
2025-06-16 20:35:35 -07:00
Nate
eaca464e9e fix vitest tests 2025-06-16 16:57:27 -07:00
Nate
192d0bee39 fix type errors 2025-06-16 16:27:00 -07:00
Patrick Erichsen
1a9910f49e fix imports 2025-06-16 09:24:10 -07:00
Patrick Erichsen
f2d72902cb feat: move rule parsing to config-yaml 2025-06-15 22:19:51 -07:00
Patrick Erichsen
6c24132fab fix: avoid parsing md rules as yaml 2025-06-12 11:09:21 -07:00
Tomasz Stefaniak
35ee97438f Merge branch 'main' into tomasz/rule-colocation 2025-06-11 15:20:08 -07:00
Tomasz Stefaniak
b553630f2a improv: constants 2025-06-11 15:04:13 -07:00
Tomasz Stefaniak
f1026c6a2c fix: uri utils 2025-06-11 14:39:40 -07:00
Tomasz Stefaniak
9dba4730b9 fix: type errors / formatting 2025-06-09 17:11:55 -07:00
Tomasz Stefaniak
ab0222d1cf improv: remove logs 2025-06-09 15:54:01 -07:00
Tomasz Stefaniak
d01f24309b fix: path 2025-06-09 13:12:04 -07:00
Tomasz Stefaniak
a7a6c5cb43 test: globs 2025-06-09 12:49:35 -07:00
Tomasz Stefaniak
0b653d7fbe Update ruleCollocationApplication.vitest.ts 2025-06-09 12:42:47 -07:00
Tomasz Stefaniak
adedb9e910 test: colocation 2025-06-09 12:38:33 -07:00
Tomasz Stefaniak
b5b4b0d31d test: colocation 2025-06-09 11:02:12 -07:00
Tomasz Stefaniak
c7339f8aaa Merge branch 'main' into tomasz/rule-colocation 2025-06-09 10:43:19 -07:00
Tomasz Stefaniak
39dc367371 feat: rule colocation 2025-06-09 10:42:17 -07:00
Patrick Erichsen
59620221fb update tests 2025-06-02 14:43:02 -07:00
Patrick Erichsen
c2571e2a86 feat: create markdown rules in notch 2025-06-02 14:33:51 -07:00
Patrick Erichsen
1b59411ec1 chore: continue bot feedback 2025-05-25 19:47:12 -07:00
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
Patrick Erichsen
e4b70dbfd8 feat: description in markdown yaml 2025-05-22 10:10:21 -07:00
Tomasz Stefaniak
ba3984290d fix: naming 2025-05-20 13:24:33 -07:00
Tomasz Stefaniak
a21d350ea1 feat: markdown rules
fix: parsing
2025-05-20 13:12:17 -07:00