Render Markdown, add ask_human context, simplify inbox responses, group inbox by task
This commit is contained in:
@@ -317,7 +317,7 @@ func (e *env) openQuestions(sessionID string) []api.InboxItem {
|
||||
}
|
||||
questions := []api.InboxItem{}
|
||||
for _, item := range items {
|
||||
if item.Kind == api.InboxItemKindQuestion {
|
||||
if item.Kind == api.Question {
|
||||
questions = append(questions, item)
|
||||
}
|
||||
}
|
||||
@@ -379,7 +379,7 @@ func TestAskHumanRoundTrip(t *testing.T) {
|
||||
t.Fatalf("awaiting human: %d %v", waiting, err)
|
||||
}
|
||||
|
||||
e.respond(m, q, api.InboxResponseTypeOption, "blue", "", api.Answered)
|
||||
e.respond(m, q, api.Option, "blue", "", api.Answered)
|
||||
events := e.waitIdle()
|
||||
|
||||
delivered := false
|
||||
@@ -423,7 +423,7 @@ func TestFollowUpQuestionThread(t *testing.T) {
|
||||
}
|
||||
first := questions[0]
|
||||
|
||||
e.respond(m, first, api.InboxResponseTypeQuestion, "", "Before I pick: which of the two did you recommend, and why?", api.Open)
|
||||
e.respond(m, first, api.Other, "", "Before I pick: which of the two did you recommend, and why?", api.Answered)
|
||||
e.waitIdle()
|
||||
|
||||
questions = e.openQuestions(sess.Id)
|
||||
@@ -435,15 +435,7 @@ func TestFollowUpQuestionThread(t *testing.T) {
|
||||
t.Fatalf("follow-up didn't continue the thread: first %s/%s, second %s/%s", first.Id, first.ThreadId, second.Id, second.ThreadId)
|
||||
}
|
||||
|
||||
old, err := e.store.GetInboxItem(e.ctx, first.Id)
|
||||
if err != nil {
|
||||
t.Fatalf("get first question: %v", err)
|
||||
}
|
||||
if old.State != api.Superseded {
|
||||
t.Fatalf("first question is %s, want superseded", old.State)
|
||||
}
|
||||
|
||||
e.respond(m, second, api.InboxResponseTypeFreeForm, "", "Use green instead of either.", api.Answered)
|
||||
e.respond(m, second, api.Other, "", "Use green instead of either.", api.Answered)
|
||||
e.waitIdle()
|
||||
|
||||
out, err := os.ReadFile(filepath.Join(e.task.WorktreePath, "color.txt"))
|
||||
|
||||
Reference in New Issue
Block a user