pi-ghost-autocomplete 0.7.0 → 0.8.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/README.md +16 -2
- package/dist/bench-cli.js +1 -1
- package/dist/bench.js +1 -1
- package/dist/cold-start.d.ts +26 -0
- package/dist/command-registry.d.ts +3 -3
- package/dist/config.d.ts +21 -0
- package/dist/cycle-manager.d.ts +21 -0
- package/dist/ghost-editor.d.ts +76 -5
- package/dist/index.d.ts +17 -4
- package/dist/index.js +1 -1
- package/dist/intent.d.ts +14 -0
- package/dist/metrics.d.ts +9 -0
- package/dist/replay-cli.js +1 -1
- package/dist/session-trie.d.ts +53 -0
- package/dist/snooze.d.ts +35 -0
- package/package.json +5 -5
package/dist/intent.d.ts
CHANGED
|
@@ -145,6 +145,20 @@ export declare function isPathContext(lineBeforeCursor: string, _token: {
|
|
|
145
145
|
token: string;
|
|
146
146
|
insideQuote: boolean;
|
|
147
147
|
}): boolean;
|
|
148
|
+
/**
|
|
149
|
+
* Is the draft a finished sentence with the cursor parked right after the
|
|
150
|
+
* terminator? Session 53.
|
|
151
|
+
*
|
|
152
|
+
* When true there is nothing left to *complete*: any continuation has to open
|
|
153
|
+
* a new sentence, and a chat model handed a finished question plus the
|
|
154
|
+
* conversation context does the thing it was trained to do — it answers.
|
|
155
|
+
* That is exactly the failure this predicate suppresses ("… für Android?" →
|
|
156
|
+
* ghost "Um das Vorhandene auf Android zu übertragen, benötigen wir …").
|
|
157
|
+
*
|
|
158
|
+
* A trailing space means the user has deliberately started the next sentence,
|
|
159
|
+
* so completion resumes as soon as they type one.
|
|
160
|
+
*/
|
|
161
|
+
export declare function isSentenceComplete(draft: string): boolean;
|
|
148
162
|
/**
|
|
149
163
|
* Short human-readable description for each intent, suitable for injection
|
|
150
164
|
* into LLM system prompts or FIM comment headers. Single canonical source —
|
package/dist/metrics.d.ts
CHANGED
|
@@ -11,6 +11,13 @@ export declare const COMPLETION_MODES: readonly ["deterministic", "llm", "cache"
|
|
|
11
11
|
export type CompletionMode = (typeof COMPLETION_MODES)[number];
|
|
12
12
|
export type RequestResult = "produced" | "empty" | "rejected" | "aborted" | "error";
|
|
13
13
|
export type AcceptanceOutcome = "accepted" | "accepted-partial" | "dismissed" | "stale" | "expired";
|
|
14
|
+
/**
|
|
15
|
+
* Gap-fix P1.4 — why a shown ghost was dismissed. Only set when
|
|
16
|
+
* `acceptance === "dismissed"`. Safe enum (no free text).
|
|
17
|
+
* - `escape` — user pressed Esc (first-class dismiss)
|
|
18
|
+
* - `keystroke` — any other key that is not an accept/cycle/preserve key
|
|
19
|
+
*/
|
|
20
|
+
export type DismissReason = "escape" | "keystroke";
|
|
14
21
|
export type QualityAttribution = "accepted" | "dismissed-attributed" | "unknown";
|
|
15
22
|
export type RejectionReason = "stale-text" | "newline" | "too-long" | "assistant-phrasing" | "duplicate-suffix" | "markdown" | "empty" | "echo-token";
|
|
16
23
|
/**
|
|
@@ -67,6 +74,8 @@ export interface MetricsRecord {
|
|
|
67
74
|
completionLength?: number;
|
|
68
75
|
shown?: boolean;
|
|
69
76
|
acceptance?: AcceptanceOutcome;
|
|
77
|
+
/** Gap-fix P1.4 — set only when `acceptance === "dismissed"`. */
|
|
78
|
+
dismissReason?: DismissReason;
|
|
70
79
|
/**
|
|
71
80
|
* For deterministic-mode records, the matched file path from the index.
|
|
72
81
|
* Allows benchmark/analysis to correlate accepted ghosts with files.
|