opencode-ghost 0.2.5 → 0.2.7
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 +15 -1
- package/README.md +14 -12
- package/package.json +1 -1
- package/src/completion.ts +8 -5
- package/src/tui.tsx +2 -3
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.2.7] - 2026-09-25
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- Root package name in `bun.lock` now matches `package.json` (`opencode-ghost`).
|
|
15
|
+
## [0.2.6] - 2026-09-25
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
|
|
19
|
+
- Partially typed slash-command arguments now ghost only the remaining letters
|
|
20
|
+
inline, rather than showing a bracketed option after the typed prefix.
|
|
21
|
+
- All ghosts, including slash-command argument hints, use dimmed grey text.
|
|
10
22
|
## [0.2.5] - 2026-09-25
|
|
11
23
|
|
|
12
24
|
### Changed
|
|
@@ -105,7 +117,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
105
117
|
- Options for `model`, `acceptKeys`, `maxChars`, `idleDelayMs`,
|
|
106
118
|
`recentMessages` and `system`.
|
|
107
119
|
|
|
108
|
-
[Unreleased]: https://github.com/ozandogrultan/opencode-ghost/compare/v0.2.
|
|
120
|
+
[Unreleased]: https://github.com/ozandogrultan/opencode-ghost/compare/v0.2.7...HEAD
|
|
121
|
+
[0.2.7]: https://github.com/ozandogrultan/opencode-ghost/compare/v0.2.6...v0.2.7
|
|
122
|
+
[0.2.6]: https://github.com/ozandogrultan/opencode-ghost/compare/v0.2.5...v0.2.6
|
|
109
123
|
[0.2.5]: https://github.com/ozandogrultan/opencode-ghost/compare/v0.2.4...v0.2.5
|
|
110
124
|
[0.2.4]: https://github.com/ozandogrultan/opencode-ghost/compare/v0.2.3...v0.2.4
|
|
111
125
|
[0.2.3]: https://github.com/ozandogrultan/opencode-ghost/compare/v0.2.2...v0.2.3
|
package/README.md
CHANGED
|
@@ -17,21 +17,23 @@ dimmed ghost text you accept with <kbd>Tab</kbd> (or <kbd>→</kbd>).
|
|
|
17
17
|
default) for one line that sounds like you.
|
|
18
18
|
- **Ghost text, `Tab` to accept.** The suggestion renders under the prompt;
|
|
19
19
|
`Tab` or `→` drops it into the input so you can edit and send.
|
|
20
|
-
- **Slash-command argument ghosts while typing.** After `/name `, accepted
|
|
21
|
-
argument options (from `argHints`)
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
20
|
+
- **Slash-command argument ghosts while typing.** After `/name `, the accepted
|
|
21
|
+
argument options (from `argHints`) are listed as `[a | b | c]` inside the
|
|
22
|
+
prompt input box, right after the caret. Once you start typing an argument,
|
|
23
|
+
the list gives way to a dimmed inline completion of the matching option (e.g.
|
|
24
|
+
`/keepwarm alw` ghosts `ays`). Running out of options or naming a command
|
|
25
|
+
with no configured hints shows no ghost — command and skill descriptions are
|
|
26
|
+
never suggested as if they were arguments. Tab completes the next argument.
|
|
27
|
+
While the command name is still being typed, opencode's own slash menu stays
|
|
28
|
+
in charge. Purely local — no model calls.
|
|
27
29
|
- **History ghost while typing.** If the line you are typing is a prefix of a
|
|
28
30
|
message you already sent in the same session, the rest of it is ghosted in
|
|
29
31
|
the box as well; Tab pulls the full line back. Also purely local.
|
|
30
|
-
- **
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
- **Grey, dimmed ghost styling.** Every ghost is grey and dimmed so it cannot
|
|
33
|
+
be mistaken for typed text. A next-message suggestion that is wider than the
|
|
34
|
+
prompt wraps onto extra rows and grows the prompt box (up to five rows) so it
|
|
35
|
+
stays fully readable; other ghosts are clipped to the box and never spill
|
|
36
|
+
past it.
|
|
35
37
|
- **`/suggest` toggles it.** State is stored in the plugin KV.
|
|
36
38
|
|
|
37
39
|
## Requirements
|
package/package.json
CHANGED
package/src/completion.ts
CHANGED
|
@@ -66,10 +66,13 @@ export function completeCommand(
|
|
|
66
66
|
if (!hintList) return undefined
|
|
67
67
|
const matches = matchOptions(parsed.args, hintList)
|
|
68
68
|
if (!matches) return undefined
|
|
69
|
-
const
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
insert: `/${parsed.name} ${completed} `,
|
|
69
|
+
const ghost = matches[0].slice(parsed.args.length)
|
|
70
|
+
const result: Completion = {
|
|
71
|
+
ghost,
|
|
72
|
+
insert: `/${parsed.name} ${parsed.args + ghost} `,
|
|
74
73
|
}
|
|
74
|
+
// Enumerate the accepted options only while the argument is still empty;
|
|
75
|
+
// once part of the word is typed, ghost the rest of the matching option.
|
|
76
|
+
if (parsed.args === "") result.args = matches
|
|
77
|
+
return result
|
|
75
78
|
}
|
package/src/tui.tsx
CHANGED
|
@@ -496,9 +496,8 @@ const tui: TuiPlugin = async (api, rawOptions) => {
|
|
|
496
496
|
let display = ""
|
|
497
497
|
let insert = ""
|
|
498
498
|
let wrap = false
|
|
499
|
-
//
|
|
500
|
-
|
|
501
|
-
const color = isSlash ? api.theme.current.accent : api.theme.current.textMuted
|
|
499
|
+
// Every ghost is grey and dimmed so it cannot be mistaken for typed text.
|
|
500
|
+
const color = api.theme.current.textMuted
|
|
502
501
|
const opacity = GHOST_OPACITY
|
|
503
502
|
if (found) {
|
|
504
503
|
const args = "args" in found ? found.args : undefined
|