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

Function waitForChatWatchStatusChangeEvent

coderd/exp_chats_test.go:6481–6497  ·  view source on GitHub ↗
(
	ctx context.Context,
	t *testing.T,
	conn *websocket.Conn,
	chatID uuid.UUID,
)

Source from the content-addressed store, hash-verified

6479}
6480
6481func waitForChatWatchStatusChangeEvent(
6482 ctx context.Context,
6483 t *testing.T,
6484 conn *websocket.Conn,
6485 chatID uuid.UUID,
6486) codersdk.ChatWatchEvent {
6487 t.Helper()
6488
6489 for {
6490 var payload codersdk.ChatWatchEvent
6491 err := wsjson.Read(ctx, conn, &payload)
6492 require.NoError(t, err)
6493 if payload.Kind == codersdk.ChatWatchEventKindStatusChange && payload.Chat.ID == chatID {
6494 return payload
6495 }
6496 }
6497}
6498
6499func TestSendMessageWithModelOverrideUpdatesLastModelConfigID(t *testing.T) {
6500 t.Parallel()

Calls 2

HelperMethod · 0.65
ReadMethod · 0.65

Tested by

no test coverage detected