Add task sidebar workflow
This commit is contained in:
@@ -83,10 +83,10 @@ func TestCanonicalizeTerminalTextMaxLines(t *testing.T) {
|
||||
|
||||
func TestGetProcessOutputStreamCanonicalByDefault(t *testing.T) {
|
||||
sess := NewSession(t.TempDir(), "test")
|
||||
c := newChildEntry("p1", "proc", KindCommand, nil, nil, "", "", "")
|
||||
c := newChildEntry("p1", "proc", KindCommand, nil, nil, "", "", "", "")
|
||||
addChild(sess, c)
|
||||
c.recordWrite([]byte("\x1b[31mStatus: running 12s\x1b[0m\nStatus: running 13s\nresult\n"))
|
||||
host := newToolHost(sess, nil, nil, preset.Set{}, nil, 80, 24)
|
||||
host := newToolHost(sess, nil, nil, nil, preset.Set{}, nil, 80, 24)
|
||||
|
||||
out, err := host.GetProcessOutput("", mcp.ProcessOutputArgs{ProcessID: c.ID, Mode: "stream"})
|
||||
if err != nil {
|
||||
@@ -105,10 +105,10 @@ func TestGetProcessOutputStreamCanonicalByDefault(t *testing.T) {
|
||||
|
||||
func TestGetProcessOutputRawReturnsStreamBytes(t *testing.T) {
|
||||
sess := NewSession(t.TempDir(), "test")
|
||||
c := newChildEntry("p1", "proc", KindCommand, nil, nil, "", "", "")
|
||||
c := newChildEntry("p1", "proc", KindCommand, nil, nil, "", "", "", "")
|
||||
addChild(sess, c)
|
||||
c.recordWrite([]byte("\x1b[31mred\x1b[0m"))
|
||||
host := newToolHost(sess, nil, nil, preset.Set{}, nil, 80, 24)
|
||||
host := newToolHost(sess, nil, nil, nil, preset.Set{}, nil, 80, 24)
|
||||
|
||||
out, err := host.GetProcessOutput("", mcp.ProcessOutputArgs{ProcessID: c.ID, Mode: "grid", Raw: true})
|
||||
if err != nil {
|
||||
@@ -130,10 +130,10 @@ func TestGetProcessOutputRawReturnsStreamBytes(t *testing.T) {
|
||||
|
||||
func TestGetProcessOutputCanonicalAfterRawRead(t *testing.T) {
|
||||
sess := NewSession(t.TempDir(), "test")
|
||||
c := newChildEntry("p1", "proc", KindCommand, nil, nil, "", "", "")
|
||||
c := newChildEntry("p1", "proc", KindCommand, nil, nil, "", "", "", "")
|
||||
addChild(sess, c)
|
||||
c.recordWrite([]byte("\x1b[31mStatus: running 12s\x1b[0m\nStatus: running 13s\nDownloading 10%\rDownloading 100%\nFINAL: deploy ready\n"))
|
||||
host := newToolHost(sess, nil, nil, preset.Set{}, nil, 80, 24)
|
||||
host := newToolHost(sess, nil, nil, nil, preset.Set{}, nil, 80, 24)
|
||||
|
||||
if _, err := host.GetProcessOutput("", mcp.ProcessOutputArgs{ProcessID: c.ID, Mode: "stream", Raw: true}); err != nil {
|
||||
t.Fatal(err)
|
||||
@@ -149,10 +149,10 @@ func TestGetProcessOutputCanonicalAfterRawRead(t *testing.T) {
|
||||
|
||||
func TestGetProcessOutputIncludeMetaRestoresFields(t *testing.T) {
|
||||
sess := NewSession(t.TempDir(), "test")
|
||||
c := newChildEntry("p1", "proc", KindCommand, nil, nil, "", "", "")
|
||||
c := newChildEntry("p1", "proc", KindCommand, nil, nil, "", "", "", "")
|
||||
addChild(sess, c)
|
||||
c.recordWrite([]byte("ok"))
|
||||
host := newToolHost(sess, nil, nil, preset.Set{}, nil, 80, 24)
|
||||
host := newToolHost(sess, nil, nil, nil, preset.Set{}, nil, 80, 24)
|
||||
|
||||
out, err := host.GetProcessOutput("", mcp.ProcessOutputArgs{ProcessID: c.ID, Mode: "stream", IncludeMeta: true})
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user