Skip to content

Commit 5e89691

Browse files
authored
fix: use after not last-id (#13)
1 parent 3ff7c4e commit 5e89691

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

gpt/mcp.nu

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export def "register" [name: string command: string] {
77
}" | .append $"mcp.($name).spawn"
88

99
# Wait for the server to be ready
10-
.cat -f --last-id $spawn_frame.id
10+
.cat -f --after $spawn_frame.id
1111
| where topic == $"mcp.($name).ready"
1212
| first
1313
}
@@ -48,7 +48,7 @@ export def "call" [name: string] {
4848
let command = $in
4949
let frame = $command | to json -r | $in + "\n" | .append $"mcp.($name).send" --meta {id: $command.id}
5050
let res = (
51-
.cat -f --last-id $frame.id
51+
.cat -f --after $frame.id
5252
| where topic == $"mcp.($name).recv"
5353
| each { .cas $in.hash | from json }
5454
| where { $in.id? == $command.id }

gpt/mod.nu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ export def process-turn [turn: record] {
232232

233233
export def call [turn_id: string preview?: closure] {
234234
let req = .append gpt.call --meta {continues: $turn_id}
235-
let res = .cat -f --last-id $req.id
235+
let res = .cat -f --after $req.id
236236
| conditional-pipe ($preview | is-not-empty) {
237237
tee {
238238
where {|frame|

xs.nu

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def _cat [options: record] {
6666
(if ($options | get tail? | default false) { "--tail" })
6767
(if ($options | get all? | default false) { "--all" })
6868

69-
(if $options.last_id? != null { ["--last-id" $options.last_id] })
69+
(if $options.after? != null { ["--after" $options.after] })
7070

7171
(if $options.limit? != null { ["--limit" $options.limit] })
7272
(if $options.pulse? != null { ["--pulse" $options.pulse] })
@@ -82,7 +82,7 @@ export def .cat [
8282
--pulse (-p): int # specifies the interval (in milliseconds) to receive a synthetic "xs.pulse" event
8383
--tail (-t) # begin long after the end of the stream
8484
--detail (-d) # include all frame fields in the output
85-
--last-id (-l): string
85+
--after (-A): string
8686
--limit: int
8787
--context (-c): string # the context to read from
8888
--all (-a) # cat across all contexts
@@ -92,7 +92,7 @@ export def .cat [
9292
follow: $follow
9393
pulse: $pulse
9494
tail: $tail
95-
last_id: $last_id
95+
after: $after
9696
limit: $limit
9797
context: (if not $all { (xs-context $context (metadata $context).span) })
9898
all: $all

0 commit comments

Comments
 (0)