Extension 0.6.0: next-edit, token healing, TS errors context, cursor-move, prewarm
ci / build (push) Canceled after 0s
ci / build (push) Canceled after 0s
- shared/nextedit.ts: next-edit prompt format (region rewrite or NO_EDIT, Qwen spare special tokens) - shared/diagnostics.ts: TS errors near the cursor as context; symbols format 2 adds namespace imports - shared/prompt.ts: token healing (cut the half-typed word, force it via grammar), errors header section - daemon: model profiles carry contextFormat/errors/members/nextEdit; /v1/next-edit with edit-burst tracking; /v1/prewarm; /v1/debug/last; token healing on by default - extension: next-edit decorations (Tab apply / Esc dismiss), suggest on cursor move, prewarm on focus, Show Last Prompt, update check against releases, diagnostics in the edit recorder - models/README: training-data attribution; release script profiles for stage-d/stage-e - .gitea/workflows/ci.yml: build + test, publish release on vscode-v* tags (needs a runner + RELEASE_TOKEN) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J39imRDT8L7xYbWzsVWd8A
This commit is contained in:
@@ -36,3 +36,28 @@ test('status text', () => {
|
||||
assert.match(statusText({ enabled: true, mode: 'symbols', effectiveMode: 'simple', model: 'stage-c' }, 41.6), /symbols→simple · 42 ms/)
|
||||
assert.match(statusText(null, null), /no daemon/)
|
||||
})
|
||||
|
||||
import { lineBlockDiff, charDiff, insertionMakesSense, newerVersion } from '../dist/logic.js'
|
||||
|
||||
test('leftover paren is a one-character deletion', () => {
|
||||
const d = charDiff('const v = fromString(someString))', 'const v = fromString(someString)')
|
||||
assert.deepEqual(d, { start: 32, deleteEnd: 33, insert: '' })
|
||||
})
|
||||
|
||||
test('line block diff finds the changed lines', () => {
|
||||
const d = lineBlockDiff('a\nb\nc\nd\n', 'a\nB\nB2\nd\n')
|
||||
assert.deepEqual(d, { oldStart: 1, oldEnd: 3, oldLines: ['b', 'c'], newLines: ['B', 'B2'] })
|
||||
assert.equal(lineBlockDiff('x\n', 'x\n'), null)
|
||||
})
|
||||
|
||||
test('cursor-move gate', () => {
|
||||
assert.equal(insertionMakesSense(' ', 4, false), true)
|
||||
assert.equal(insertionMakesSense(' foo()', 7, false), true)
|
||||
assert.equal(insertionMakesSense(' foo()', 3, false), false)
|
||||
assert.equal(insertionMakesSense(' foo()', 3, true), true)
|
||||
})
|
||||
|
||||
test('version comparison', () => {
|
||||
assert.equal(newerVersion('0.10.0', '0.9.3'), true)
|
||||
assert.equal(newerVersion('0.5.0', '0.5.0'), false)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user