MCPcopy Create free account
hub / github.com/code-with-antonio/nightcode / headers

Function headers

packages/cli/src/hooks/use-chat.ts:35–38  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

33 return new DefaultChatTransport<Message>({
34 api: apiClient.chat.$url().toString(),
35 headers() {
36 const auth = getAuth();
37 return auth ? { Authorization: `Bearer ${auth.token}` } : new Headers();
38 },
39 prepareSendMessagesRequest({ messages }) {
40 const message = messages[messages.length - 1];
41 if (!message) throw new Error("No message to send");

Callers

nothing calls this directly

Calls 1

getAuthFunction · 0.90

Tested by

no test coverage detected