Skip to content
Merged
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
5 changes: 5 additions & 0 deletions packages/web-api/src/types/request/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,11 @@ export interface ChatStartStreamArguments extends TokenOverridable, Channel, Par
* This is required when starting a streaming conversation outside of a DM.
*/
recipient_user_id?: string;
/**
* @description Specifies how tasks are displayed in the message. A "timeline" displays individual tasks
* interleaved with text and "plan" displays all tasks together.
Comment on lines +259 to +260
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

praise: Really like this description!

*/
task_display_mode?: string;
}

export type ChatStopStreamArguments = TokenOverridable &
Expand Down
27 changes: 27 additions & 0 deletions packages/web-api/test/types/methods/chat.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -833,6 +833,33 @@ expectAssignable<Parameters<typeof web.chat.startStream>>([
},
]);

expectAssignable<Parameters<typeof web.chat.startStream>>([
{
channel: 'C1234',
thread_ts: '1234.56',
chunks: [
{
type: 'markdown_text',
text: 'Hello world',
},
{
type: 'plan_update',
title: 'Hello world',
},
{
type: 'task_update',
id: 'task-1',
title: 'Processing request',
status: 'in_progress',
details: 'Working on it...',
},
],
recipient_team_id: 'T1234',
recipient_user_id: 'U1234',
task_display_mode: 'timeline', // Expect to be supported
},
]);

// chat.stopStream
// -- sad path
expectError(web.chat.stopStream()); // lacking argument
Expand Down
Loading