Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 1 addition & 16 deletions apps/www/content/3.components/1.chatbot/confirmation.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,21 +194,6 @@ export type ToolUIPartApproval
approved: boolean
reason?: string
}
| {
id: string
approved: true
reason?: string
}
| {
id: string
approved: true
reason?: string
}
| {
id: string
approved: false
reason?: string
}
| undefined

export interface ConfirmationContextValue {
Expand All @@ -220,7 +205,7 @@ export const ConfirmationKey: InjectionKey<ConfirmationContextValue>
= Symbol('ConfirmationContext')

export function useConfirmationContext() {
const context = inject<ConfirmationContextValue | null>(ConfirmationKey, null)
const context = inject(ConfirmationKey)
if (!context)
throw new Error('Confirmation components must be used within <Confirmation>')
return context
Expand Down
17 changes: 1 addition & 16 deletions packages/elements/src/confirmation/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,6 @@ export type ToolUIPartApproval
approved: boolean
reason?: string
}
| {
id: string
approved: true
reason?: string
}
| {
id: string
approved: true
reason?: string
}
| {
id: string
approved: false
reason?: string
}
| undefined

export interface ConfirmationContextValue {
Expand All @@ -39,7 +24,7 @@ export const ConfirmationKey: InjectionKey<ConfirmationContextValue>
= Symbol('ConfirmationContext')

export function useConfirmationContext() {
const context = inject<ConfirmationContextValue | null>(ConfirmationKey, null)
const context = inject(ConfirmationKey)
if (!context)
throw new Error('Confirmation components must be used within <Confirmation>')
return context
Expand Down