opencode-quill 0.9.0 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/README.md +3 -2
- package/package.json +1 -1
- package/src/predictor.ts +6 -4
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,12 @@ All notable changes are documented in this file using
|
|
|
4
4
|
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and
|
|
5
5
|
[Semantic Versioning](https://semver.org/).
|
|
6
6
|
|
|
7
|
+
## [0.9.1] - 2026-11-27
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- **predictor:** Require stronger confidence on weak two-letter prefixes (#33)
|
|
12
|
+
|
|
7
13
|
## [0.9.0] - 2026-11-27
|
|
8
14
|
|
|
9
15
|
### Added
|
|
@@ -181,6 +187,7 @@ All notable changes are documented in this file using
|
|
|
181
187
|
- `/quill` command and command palette action to toggle autocomplete.
|
|
182
188
|
- Local installer script, full test suite, CI workflows, and release tooling.
|
|
183
189
|
|
|
190
|
+
[0.9.1]: https://github.com/ozandogrultan/opencode-quill/compare/v0.9.0...v0.9.1
|
|
184
191
|
[0.9.0]: https://github.com/ozandogrultan/opencode-quill/compare/v0.8.0...v0.9.0
|
|
185
192
|
[0.8.0]: https://github.com/ozandogrultan/opencode-quill/compare/v0.7.1...v0.8.0
|
|
186
193
|
[0.7.1]: https://github.com/ozandogrultan/opencode-quill/compare/v0.7.0...v0.7.1
|
package/README.md
CHANGED
|
@@ -293,8 +293,9 @@ Quill learns from your own submitted prompts, never from assistant output:
|
|
|
293
293
|
- **Current draft:** words already in the draft get a small boost.
|
|
294
294
|
- **Confidence gating:** a suggestion is shown only when it clears a
|
|
295
295
|
confidence threshold, which is stricter for next-word predictions than for
|
|
296
|
-
prefix completions
|
|
297
|
-
|
|
296
|
+
prefix completions. In prose, single-letter prefixes and two-letter prefixes
|
|
297
|
+
without repeated context also require higher confidence. If a typed prose
|
|
298
|
+
prefix of two or more letters is already a confident word, a longer
|
|
298
299
|
word is also offered when it scores at least 40% as high in the current
|
|
299
300
|
context (typing `local` offers `locally`). Shell mode shows nothing when
|
|
300
301
|
the typed command is already the most likely word.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-quill",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"description": "OpenCode prompt autocomplete: local n-gram word and next-word prediction shown as inline ghost text in the TUI composer, accepted with Tab.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
package/src/predictor.ts
CHANGED
|
@@ -337,6 +337,7 @@ export class WordPredictor {
|
|
|
337
337
|
const maximum = Number.isFinite(limit) ? Math.max(0, Math.min(5, Math.floor(limit))) : 5
|
|
338
338
|
if (!maximum) return []
|
|
339
339
|
const prefix = this.grammar.normalize(query.prefix)
|
|
340
|
+
const prefixLength = [...prefix].length
|
|
340
341
|
const words = query.words ?? (this.grammar.prose ? proseWords(query.before) : [])
|
|
341
342
|
const local = new Map<string, number>()
|
|
342
343
|
for (const word of words) increment(local, word.text)
|
|
@@ -345,7 +346,7 @@ export class WordPredictor {
|
|
|
345
346
|
const pair = context.length === 2 ? context.join("\0") : undefined
|
|
346
347
|
const evidence = this.bigramTotals.get(previous ?? "")?.total ?? 0
|
|
347
348
|
if (query.next && evidence < 2) return []
|
|
348
|
-
if (!query.next &&
|
|
349
|
+
if (!query.next && prefixLength < 2 && evidence < 2) return []
|
|
349
350
|
const slash = prefix.includes("/")
|
|
350
351
|
const followed = (word: string) => (previous ? this.personal.bigrams.get(`${previous}\0${word}`) ?? 0 : 0) >= 2 ||
|
|
351
352
|
(pair ? this.personal.trigrams.get(`${pair}\0${word}`) ?? 0 : 0) >= 2
|
|
@@ -376,8 +377,9 @@ export class WordPredictor {
|
|
|
376
377
|
}
|
|
377
378
|
const predictions: Prediction[] = []
|
|
378
379
|
const exact = query.next ? 0 : ranked.find(({ word }) => word === prefix)?.score ?? 0
|
|
379
|
-
const short =
|
|
380
|
-
const
|
|
380
|
+
const short = prefixLength < 2
|
|
381
|
+
const cautiousPrefix = short || (prefixLength === 2 && evidence < 2)
|
|
382
|
+
const threshold = this.grammar.prose && cautiousPrefix ? SHORT_CONFIDENCE : CONFIDENCE
|
|
381
383
|
const exactConfident = this.grammar.prose && !short && exact >= threshold * (sum || 1)
|
|
382
384
|
for (const { word: best, score: bestScore, weight: bestWeight } of ranked) {
|
|
383
385
|
if (best === prefix && !query.next) {
|
|
@@ -407,7 +409,7 @@ export class WordPredictor {
|
|
|
407
409
|
return predictions.slice(0, maximum)
|
|
408
410
|
}
|
|
409
411
|
const completion = suggest()
|
|
410
|
-
if (completion.length || query.next ||
|
|
412
|
+
if (completion.length || query.next || prefixLength < 3 || slash || prefix.endsWith("'") || candidates.has(prefix) || !this.grammar.prose) return completion
|
|
411
413
|
for (const word of this.nearbyWords(prefix)) {
|
|
412
414
|
if (candidates.has(word)) continue
|
|
413
415
|
const weight = typoWeight(prefix, word)
|