Use rules (.sourcegraph/*.rule.md) in chat and auto-edit #26250
Annotations
10 errors
Run pnpm run test:unit --run:
vscode/src/autoedits/autoedits-provider.test.ts#L94
AssertionError: expected undefined to be 'const x = 1\n' // Object.is equality
- Expected:
"const x = 1
"
+ Received:
undefined
❯ src/autoedits/autoedits-provider.test.ts:94:36
|
Run pnpm run test:unit --run:
vscode/src/autoedits/autoedits-provider.test.ts#L233
AssertionError: expected undefined to be 'const x = 1\n' // Object.is equality
- Expected:
"const x = 1
"
+ Received:
undefined
❯ src/autoedits/autoedits-provider.test.ts:233:36
|
Run pnpm run test:unit --run:
vscode/src/autoedits/autoedits-provider.test.ts#L302
AssertionError: expected undefined to be 'const x = 1\n' // Object.is equality
- Expected:
"const x = 1
"
+ Received:
undefined
❯ src/autoedits/autoedits-provider.test.ts:302:36
|
Run pnpm run test:unit --run:
vscode/src/autoedits/autoedits-provider.test.ts#L354
AssertionError: expected "recordEvent" to be called 1 times, but got 0 times
❯ src/autoedits/autoedits-provider.test.ts:354:27
|
Run pnpm run test:unit --run:
vscode/src/autoedits/autoedits-provider.test.ts#L393
Error: Snapshot `AutoeditsProvider > set the cody.supersuggest.active context for inline decoration items 1` mismatched
- Expected
+ Received
- [
- [
- "setContext",
- "cody.supersuggest.active",
- true,
- ],
- ]
+ []
❯ src/autoedits/autoedits-provider.test.ts:393:34
|
Run pnpm run test:unit --run:
vscode/src/autoedits/autoedits-provider.test.ts#L418
Error: Snapshot `AutoeditsProvider > unset the cody.supersuggest.active context for inline decoration rejection 1` mismatched
- Expected
+ Received
- [
- [
- "setContext",
- "cody.supersuggest.active",
- true,
- ],
- ]
+ []
❯ src/autoedits/autoedits-provider.test.ts:418:34
|
Run pnpm run test:unit --run:
vscode/src/autoedits/autoedits-provider.test.ts#L453
AssertionError: expected +0 to be 1 // Object.is equality
- Expected
+ Received
- 1
+ 0
❯ src/autoedits/autoedits-provider.test.ts:453:34
|
Run pnpm run test:unit --run:
vscode/src/context/openctx.test.ts#L44
AssertionError: expected [ 'internal-web-provider', …(1) ] to deeply equal [ 'internal-web-provider' ]
- Expected
+ Received
Array [
"internal-web-provider",
+ "internal-rules-provider",
]
❯ src/context/openctx.test.ts:44:51
|
Run pnpm run test:unit --run:
vscode/src/context/openctx.test.ts#L54
AssertionError: expected [ 'internal-web-provider', …(4) ] to deeply equal [ 'internal-web-provider', …(3) ]
- Expected
+ Received
Array [
"internal-web-provider",
+ "internal-rules-provider",
"internal-remote-repository-search",
"internal-remote-directory-search",
"internal-remote-file-search",
]
❯ src/context/openctx.test.ts:54:51
|
Run pnpm run test:unit --run:
vscode/src/autoedits/prompt/default-prompt-strategy.test.ts#L193
AssertionError: expected 'Help me finish a coding change. In pa…' to deeply equal 'Help me finish a coding change. In pa…'
- Expected
+ Received
Help me finish a coding change. In particular, you will see a series of snippets from current open files in my editor, files I have recently viewed, the file I am editing, then a history of my recent codebase changes, then current compiler and linter errors, content I copied from my codebase. You will then rewrite the <code_to_rewrite>, to match what you think I would do next in the codebase. Note: I might have stopped in the middle of typing.
Here are some snippets of code I have extracted from open files in my code editor. It's possible these aren't entirely relevant to my code change:
<extracted_code_snippets>
<snippet>
(`test1.ts`)
jaccard similarity context 1
</snippet>
<snippet>
(`test2.ts`)
jaccard similarity context 2
</snippet>
</extracted_code_snippets>
Here are some snippets of code I have recently viewed, roughly from oldest to newest. It's possible these aren't entirely relevant to my code change:
<recently_viewed_snippets>
<snippet>
(`test3.ts`)
view port context 4
</snippet>
<snippet>
(`test2.ts`)
view port context 3
</snippet>
<snippet>
(`test1.ts`)
view port context 2
</snippet>
<snippet>
(`test0.ts`)
view port context 1
</snippet>
</recently_viewed_snippets>
Here is the file that I am looking at (`test.ts`)
<file>
<<<AREA_AROUND_CODE_TO_REWRITE_WILL_BE_INSERTED_HERE>>>
</file>
Here is my recent series of edits from oldest to newest.
<diff_history>
test2.ts
recent edits context 5
test3.ts
recent edits context 4
test3.ts
recent edits context 3
test0.ts
recent edits context 2
test0.ts
recent edits context 1
</diff_history>
Here are some linter errors from the code that you will rewrite.
<lint_errors>
(`test1.ts`)
diagnostics context 1
diagnostics context 2
(`test2.ts`)
diagnostics context 3
</lint_errors>
Here is some recent code I copied from the editor.
<recent_copy>
(`test1.ts`)
recent copy context 1
(`test2.ts`)
recent copy context 2
</recent_copy>
<area_around_code_to_rewrite>
line 37
line 38
line 39
line 40
line 41
line 42
line 43
line 44
line 45
line 46
<code_to_rewrite>
line 47
line 48
line 49
line 50
line 51
line 52
line 53
</code_to_rewrite>
line 54
line 55
line 56
line 57
line 58
line 59
line 60
line 61
line 62
line 63
line 64
</area_around_code_to_rewrite>
+
Now, continue where I left off and finish my change by rewriting "code_to_rewrite":
❯ src/autoedits/prompt/default-prompt-strategy.test.ts:193:35
|
Loading