ChatDebugStep converts a database.ChatDebugStep to a codersdk.ChatDebugStep.
(s database.ChatDebugStep)
| 1901 | // ChatDebugStep converts a database.ChatDebugStep to a |
| 1902 | // codersdk.ChatDebugStep. |
| 1903 | func 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. |