MCPcopy
hub / github.com/wandb/openui / getShare

Function getShare

frontend/src/api/openui.ts:62–71  ·  view source on GitHub ↗
(id: string)

Source from the content-addressed store, hash-verified

60}
61
62export async function getShare(id: string): Promise<HistoryItem> {
63 const r = await fetch(`${API_HOST}/share/${id}`)
64 if (r.status !== 200) {
65 const body = (await r.json()) as ErrorBody
66 throw new Error(body.error.message)
67 }
68 const body = (await r.json()) as HistoryItem
69 body.createdAt = new Date()
70 return body
71}
72
73export async function saveSession(session: SessionData): Promise<void> {
74 try {

Callers 1

ChatFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected