[Bug]: `wsh termscrollback` returns zero lines for valid ranges starting at line 0

オープン 初心者向け
#3,587 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
66/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
go
領域
backend, cli

調査の方向性

まず wsh termscrollback の Go 実装と term_get_scrollback ツールを特定し、--start と --end がスクロールバックの行位置にどのように対応するかを追ってください。0 行目から始まる有効な範囲で再現し、スクロールバック全体のエクスポートと比較してください。0 から始まる範囲について、両方のコマンドが期待される行を返せば完了です。

索引モデルが issue の本文から書いたものです。

説明

bug triage
Current Behavior

wsh termscrollback returns zero lines for valid ranges starting at line 0.
This affects both wsh termscrollback and the AI term_get_scrollback tool.
Use-case:

  1. Open the terminal.
  2. Execute an invalid command.
  3. Open the Wave AI panel.
  4. Type the message: "Explain the error."
  5. The AI reports that it cannot explain the error because it has no relevant information.

Many models execute the term_get_scrollback tool with a range of 0–20 or 0–50.

Expected Behavior

the AI term_get_scrollback tool returns valid data.

Steps To Reproduce

Environment

  • Wave Terminal: v0.14.5
  • Shell: PowerShell 7.6.9
  • AI Widget Context: Enabled
  • AI mode: Wave AI cloud - quick

Steps to reproduce

  1. Open a new PowerShell terminal.
  2. Execute:
Write-Output "SCROLLBACK_TEST_1"
Write-Output "SCROLLBACK_TEST_2"
Write-Output "SCROLLBACK_TEST_3"
  1. Export the complete scrollback
wsh termscrollback -o .\full.txt

The export contains 9 lines, with the three test strings at lines 2, 4, and 6.
4.. Request lines 0–20:

wsh termscrollback --start 0 --end 20 -o .\test.txt

Output:

terminal scrollback written to .\test.txt (0 lines)

and the file size=0.
5. Ask Wave AI to retrieve terminal output from lines 0–20:
Read terminal output from lines 0 to 20. Return the exact text, without summarizing.

Actual result: No text was retrieved. Ouput:
'I couldn't read any terminal lines 0–20 — the widget returned no output. Would you like me to try again'

The full scrollback export works correctly, but range-based retrieval appears inconsistent with the absolute line positions in the exported buffer.

Wave Version

v0.14.5

Platform

Windows

OS Version/Distribution

11

Architecture

x64

Anything else?

No response

主要言語
Go
スター
22.7k
フォーク
1.2k
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

wavetermdev/waveterm のほかの issue

wavetermdev/waveterm の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。