oficina / equipo Public

Clone
git clone https://amadan.net/oficina/equipo

Plain git — no account needed to clone.

Download

Download this file

1package runnerproto
2
3import (
4 "strings"
5 "testing"
6)
7
8func TestPendingContextCannotBeTrimmed(t *testing.T) {
9 c := CoordinatorContext{ConversationID: "chat", Revision: 1, Pending: []string{"first", "last"}, Recent: []MessageRef{{ID: "first", Body: strings.Repeat("a", 20000)}, {ID: "last", Body: strings.Repeat("b", 20000)}}}
10 if _, err := BoundCoordinatorContext(c); err != ErrPromptTooLarge {
11 t.Fatal("silently dropped a pending request", err)
12 }
13 c.Pending = []string{"last"}
14 if _, err := BoundCoordinatorContext(c); err != nil {
15 t.Fatal(err)
16 }
17}
18