Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions tui/testdata/scenarios/lsp-diagnostics.scenario
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@
# The assertion is "No LSP diagnostics." rather than a listing: this workspace has gopls with
# nothing to report, and that string is only reachable when a client exists. The listing (the
# third outcome) would need real diagnostics present.
#
# The final answer is waited for before the "/diagnostics" submit: the tool-call line renders
# before the tool runs, and the TUI refuses an Enter while a run is in flight, so a command sent
# on that line alone is dropped and stays in the input box (issue #117 — measured by run #298,
# which timed out on the identical tree run #297 passed).
#
# The wipe drops the write permission the language server needs before removing it: gopls
# resolves the workspace through the redirected HOME, so the previous run left a read-only
# Go module cache under $HOME/go/pkg/mod and `rm -rf` alone could not empty the directory.
Expand All @@ -21,6 +27,8 @@ wait --text "Type your request" --timeout 20s
send --text "read main.go"
send --key enter
wait --text "read_file" --timeout 20s
wait --text "stub-final-ok" --timeout 60s
stable 200ms --timeout 10s
send --text /diagnostics
send --key enter
wait --text "No LSP diagnostics." --timeout 30s
Expand Down
10 changes: 10 additions & 0 deletions tui/testdata/scenarios/lsp-tools.scenario
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@
# config.json)" instead — wrong advice with LSP enabled and working.
#
# It complements lsp-diagnostics.scenario, which drives the file-read route.
#
# The tool-call line renders *before* the tool runs, so it is not a signal that the input is
# accepting submits again — the TUI refuses an Enter while a run is in flight (tui/update.go).
# With only that wait in place, the "/diagnostics" keystrokes landed during the gopls start and
# the Enter was dropped: run #298 timed out with the command still sitting in the input box,
# while run #297 passed on the identical tree (issue #117). Waiting for the model's final answer
# is what makes the submit land, and the stub answers with it once the tool result goes back.
#
# The wipe drops the write permission the language server needs first: gopls resolves the
# workspace through the redirected HOME, so a previous run leaves a read-only Go module cache
# under $HOME/go/pkg/mod that `rm -rf` alone cannot remove — and then the `&&` chain stops
Expand All @@ -24,6 +32,8 @@ wait --text "Type your request" --timeout 20s
send --text "list the symbols in main.go"
send --key enter
wait --text "lsp_symbols" --timeout 30s
wait --text "stub-final-ok" --timeout 60s
stable 200ms --timeout 10s
send --text /diagnostics
send --key enter
wait --text "No LSP diagnostics." --timeout 30s
Expand Down
Loading