MCPcopy Index your code
hub / github.com/21st-dev/1code / useSubChatDraft

Function useSubChatDraft

src/renderer/features/agents/lib/drafts.ts:308–317  ·  view source on GitHub ↗
(
  parentChatId: string | null,
  subChatId: string
)

Source from the content-addressed store, hash-verified

306 * Hook to get a specific sub-chat draft
307 */
308export function useSubChatDraft(
309 parentChatId: string | null,
310 subChatId: string
311): string | null {
312 const draftsCache = useSubChatDraftsCache()
313
314 if (!parentChatId) return null
315 const key = getSubChatDraftKey(parentChatId, subChatId)
316 return draftsCache[key] || null
317}
318
319// ============================================
320// Attachment persistence utilities

Callers

nothing calls this directly

Calls 2

useSubChatDraftsCacheFunction · 0.85
getSubChatDraftKeyFunction · 0.85

Tested by

no test coverage detected