You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: aiprompts/wave-osc-16162.md
+12-13Lines changed: 12 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -125,23 +125,22 @@ Reports the current state of the command line input buffer.
125
125
**Data Type:**
126
126
```typescript
127
127
{
128
-
inputempty?:boolean; // Whether the command line buffer is empty
128
+
buffer64: string; // Base64-encoded command line buffer contents
129
+
cursor: number; // ZLE cursor position within the decoded buffer
129
130
}
130
131
```
131
132
132
-
**When:** Sent during ZLE (Zsh Line Editor) hooks when buffer state changes
133
-
-`zle-line-init` - When line editor is initialized
134
-
-`zle-line-pre-redraw` - Before line is redrawn
133
+
**When:** Sent in response to Wave writing `^_Wr` (`\x1fWr`) into the PTY while ZLE is active
135
134
136
-
**Purpose:** Allows Wave Terminal to track the state of the command line input. Currently reports whether the buffer is empty, but may be extended to include additional input state information in the future.
135
+
**Purpose:** Allows Wave Terminal to synchronize the full command line buffer and cursor position in a single round trip.
137
136
138
137
**Example:**
139
138
```bash
140
-
#When buffer is empty
141
-
I;{"inputempty":true}
139
+
#Empty buffer at cursor 0
140
+
I;{"buffer64":"","cursor":0}
142
141
143
-
#When buffer has content
144
-
I;{"inputempty":false}
142
+
#Buffer contains "echo hello" and cursor is after "echo"
143
+
I;{"buffer64":"ZWNobyBoZWxsbw==","cursor":4}
145
144
```
146
145
147
146
### R - Reset Alternate Buffer
@@ -178,12 +177,12 @@ Here's the typical sequence during shell interaction:
178
177
→ A (prompt start)
179
178
180
179
3. User types command and presses Enter
181
-
→ I;{"inputempty":false} (input no longer empty - sent as user types)
0 commit comments