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

Function refreshChatWorkspaceSnapshot

coderd/x/chatd/chatd.go:8886–8901  ·  view source on GitHub ↗
(
	ctx context.Context,
	chat database.Chat,
	loadChat func(context.Context, uuid.UUID) (database.Chat, error),
)

Source from the content-addressed store, hash-verified

8884}
8885
8886func refreshChatWorkspaceSnapshot(
8887 ctx context.Context,
8888 chat database.Chat,
8889 loadChat func(context.Context, uuid.UUID) (database.Chat, error),
8890) (database.Chat, error) {
8891 if chat.WorkspaceID.Valid || loadChat == nil {
8892 return chat, nil
8893 }
8894
8895 refreshedChat, err := loadChat(ctx, chat.ID)
8896 if err != nil {
8897 return chat, xerrors.Errorf("reload chat workspace state: %w", err)
8898 }
8899
8900 return refreshedChat, nil
8901}
8902
8903// contextFileAgentID extracts the workspace agent ID from the most
8904// recent persisted instruction-file parts. The skill-only sentinel is

Calls 1

ErrorfMethod · 0.45