File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ type SetSuggestedPromptsFn = (
4646
4747interface SetSuggestedPromptsArguments {
4848 /** @description Prompt suggestions that appear when opening assistant thread. */
49- prompts : [ AssistantPrompt , ... AssistantPrompt [ ] ] ;
49+ prompts : AssistantPrompt [ ] ;
5050 /** @description Title for the prompts. */
5151 title ?: string ;
5252}
Original file line number Diff line number Diff line change 1+ import type { AssistantThreadsSetSuggestedPromptsResponse } from '@slack/web-api' ;
12import { expectError , expectType } from 'tsd' ;
23import { type AllAssistantMiddlewareArgs , Assistant } from '../../src/Assistant' ;
34import type { AssistantThreadContext } from '../../src/AssistantThreadContextStore' ;
@@ -33,8 +34,13 @@ expectType<Assistant>(
3334// threadStarted tests
3435new Assistant ( {
3536 userMessage : asyncNoop ,
36- threadStarted : async ( { saveThreadContext } ) => {
37+ threadStarted : async ( { saveThreadContext, setSuggestedPrompts } ) => {
3738 expectType < void > ( await saveThreadContext ( ) ) ;
39+ expectType < AssistantThreadsSetSuggestedPromptsResponse > (
40+ await setSuggestedPrompts ( {
41+ prompts : [ ] ,
42+ } ) ,
43+ ) ;
3844 return Promise . resolve ( ) ;
3945 } ,
4046} ) ;
You can’t perform that action at this time.
0 commit comments