@oh-my-pi/pi-tui 16.2.9 → 16.2.11
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 +6 -0
- package/package.json +3 -3
- package/src/autocomplete.ts +16 -5
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [16.2.10] - 2026-06-30
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- Fixed mid-prompt `/skill:<name>` autocomplete acceptance wiping the user's draft. The autocomplete now inserts the `/skill:<name> ` token at the cursor (replacing only the partial `/sk` slash token) and preserves prose typed before and after it, so a user can compose a prompt and reach for a skill without losing their train of thought ([#3913](https://github.com/can1357/oh-my-pi/issues/3913)).
|
|
10
|
+
|
|
5
11
|
## [16.2.9] - 2026-06-30
|
|
6
12
|
|
|
7
13
|
### Added
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@oh-my-pi/pi-tui",
|
|
4
|
-
"version": "16.2.
|
|
4
|
+
"version": "16.2.11",
|
|
5
5
|
"description": "Terminal User Interface library with differential rendering for efficient text-based applications",
|
|
6
6
|
"homepage": "https://omp.sh",
|
|
7
7
|
"author": "Can Boluk",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"fmt": "biome format --write ."
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@oh-my-pi/pi-natives": "16.2.
|
|
41
|
-
"@oh-my-pi/pi-utils": "16.2.
|
|
40
|
+
"@oh-my-pi/pi-natives": "16.2.11",
|
|
41
|
+
"@oh-my-pi/pi-utils": "16.2.11",
|
|
42
42
|
"lru-cache": "11.5.1",
|
|
43
43
|
"marked": "^18.0.5"
|
|
44
44
|
},
|
package/src/autocomplete.ts
CHANGED
|
@@ -522,12 +522,23 @@ export class CombinedAutocompleteProvider implements AutocompleteProvider {
|
|
|
522
522
|
hasPromptTextBeforeSlash(lines, cursorLine, textBeforeCursor, trailingSlashStart) &&
|
|
523
523
|
findTrailingSlashCommandStart(prefix) !== null;
|
|
524
524
|
|
|
525
|
-
if (isMidPromptSkillLookup) {
|
|
526
|
-
|
|
525
|
+
if (isMidPromptSkillLookup && trailingSlashStart !== null) {
|
|
526
|
+
// Replace ONLY the partial slash token (e.g. "/sec") at the cursor with
|
|
527
|
+
// `/skill:<name> `; the rest of the user's draft — prose typed before
|
|
528
|
+
// the slash, text after the cursor, and any other lines — is preserved.
|
|
529
|
+
// The submit-time parser (`parseSkillInvocation` in coding-agent/skills)
|
|
530
|
+
// detects the mid-prompt `/skill:<name>` token and threads the surrounding
|
|
531
|
+
// prose through as `args`, so the skill still invokes (issue #3913, after
|
|
532
|
+
// the original mid-prompt autocomplete landed in #3654 wiped the draft).
|
|
533
|
+
const beforeSlash = currentLine.slice(0, trailingSlashStart);
|
|
534
|
+
const insert = `/${item.value} `;
|
|
535
|
+
const newLine = `${beforeSlash}${insert}${afterCursor}`;
|
|
536
|
+
const newLines = [...lines];
|
|
537
|
+
newLines[cursorLine] = newLine;
|
|
527
538
|
return {
|
|
528
|
-
lines:
|
|
529
|
-
cursorLine
|
|
530
|
-
cursorCol:
|
|
539
|
+
lines: newLines,
|
|
540
|
+
cursorLine,
|
|
541
|
+
cursorCol: beforeSlash.length + insert.length,
|
|
531
542
|
};
|
|
532
543
|
}
|
|
533
544
|
|