MCPcopy Index your code
hub / github.com/coder/coder / waitForTerminalChat

Function waitForTerminalChat

coderd/x/chatd/chatd_test.go:6179–6198  ·  view source on GitHub ↗
(
	ctx context.Context,
	t *testing.T,
	db database.Store,
	chatID uuid.UUID,
)

Source from the content-addressed store, hash-verified

6177}
6178
6179func waitForTerminalChat(
6180 ctx context.Context,
6181 t *testing.T,
6182 db database.Store,
6183 chatID uuid.UUID,
6184) database.Chat {
6185 t.Helper()
6186
6187 var chatResult database.Chat
6188 testutil.Eventually(ctx, t, func(ctx context.Context) bool {
6189 got, err := db.GetChatByID(ctx, chatID)
6190 if err != nil {
6191 return false
6192 }
6193 chatResult = got
6194 return got.Status == database.ChatStatusWaiting || got.Status == database.ChatStatusError
6195 }, testutil.IntervalFast)
6196
6197 return chatResult
6198}
6199
6200func insertChatModelConfigWithCallConfig(
6201 t *testing.T,

Calls 3

EventuallyFunction · 0.92
HelperMethod · 0.65
GetChatByIDMethod · 0.65

Tested by

no test coverage detected