File tree Expand file tree Collapse file tree 2 files changed +2
-32
lines changed
apps/www/content/3.components/1.chatbot
packages/elements/src/confirmation Expand file tree Collapse file tree 2 files changed +2
-32
lines changed Original file line number Diff line number Diff line change @@ -194,21 +194,6 @@ export type ToolUIPartApproval
194194 approved: boolean
195195 reason? : string
196196 }
197- | {
198- id: string
199- approved: true
200- reason? : string
201- }
202- | {
203- id: string
204- approved: true
205- reason? : string
206- }
207- | {
208- id: string
209- approved: false
210- reason? : string
211- }
212197 | undefined
213198
214199export interface ConfirmationContextValue {
@@ -220,7 +205,7 @@ export const ConfirmationKey: InjectionKey<ConfirmationContextValue>
220205 = Symbol (' ConfirmationContext' )
221206
222207export function useConfirmationContext() {
223- const context = inject < ConfirmationContextValue | null > (ConfirmationKey , null )
208+ const context = inject (ConfirmationKey )
224209 if (! context )
225210 throw new Error (' Confirmation components must be used within <Confirmation>' )
226211 return context
Original file line number Diff line number Diff line change @@ -13,21 +13,6 @@ export type ToolUIPartApproval
1313 approved : boolean
1414 reason ?: string
1515 }
16- | {
17- id : string
18- approved : true
19- reason ?: string
20- }
21- | {
22- id : string
23- approved : true
24- reason ?: string
25- }
26- | {
27- id : string
28- approved : false
29- reason ?: string
30- }
3116 | undefined
3217
3318export interface ConfirmationContextValue {
@@ -39,7 +24,7 @@ export const ConfirmationKey: InjectionKey<ConfirmationContextValue>
3924 = Symbol ( 'ConfirmationContext' )
4025
4126export function useConfirmationContext ( ) {
42- const context = inject < ConfirmationContextValue | null > ( ConfirmationKey , null )
27+ const context = inject ( ConfirmationKey )
4328 if ( ! context )
4429 throw new Error ( 'Confirmation components must be used within <Confirmation>' )
4530 return context
You can’t perform that action at this time.
0 commit comments