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

Function ChatDebugStep

coderd/database/db2sdk/db2sdk.go:1903–1923  ·  view source on GitHub ↗

ChatDebugStep converts a database.ChatDebugStep to a codersdk.ChatDebugStep.

(s database.ChatDebugStep)

Source from the content-addressed store, hash-verified

1901// ChatDebugStep converts a database.ChatDebugStep to a
1902// codersdk.ChatDebugStep.
1903func ChatDebugStep(s database.ChatDebugStep) codersdk.ChatDebugStep {
1904 return codersdk.ChatDebugStep{
1905 ID: s.ID,
1906 RunID: s.RunID,
1907 ChatID: s.ChatID,
1908 StepNumber: s.StepNumber,
1909 Operation: codersdk.ChatDebugStepOperation(s.Operation),
1910 Status: codersdk.ChatDebugStatus(s.Status),
1911 HistoryTipMessageID: nullInt64Ptr(s.HistoryTipMessageID),
1912 AssistantMessageID: nullInt64Ptr(s.AssistantMessageID),
1913 NormalizedRequest: rawJSONObject(s.NormalizedRequest),
1914 NormalizedResponse: nullRawJSONObject(s.NormalizedResponse),
1915 Usage: nullRawJSONObject(s.Usage),
1916 Attempts: chatDebugAttempts(s.Attempts),
1917 Error: nullRawJSONObject(s.Error),
1918 Metadata: rawJSONObject(s.Metadata),
1919 StartedAt: s.StartedAt,
1920 UpdatedAt: s.UpdatedAt,
1921 FinishedAt: nullTimePtr(s.FinishedAt),
1922 }
1923}
1924
1925// ChatDebugRunDetail converts a database.ChatDebugRun and its steps
1926// to a codersdk.ChatDebugRun.

Calls 7

ChatDebugStepOperationTypeAlias · 0.92
ChatDebugStatusTypeAlias · 0.92
rawJSONObjectFunction · 0.85
nullRawJSONObjectFunction · 0.85
chatDebugAttemptsFunction · 0.85
nullTimePtrFunction · 0.85
nullInt64PtrFunction · 0.70