Skip to content

Commit f2ac218

Browse files
srtaalejmwbrookszimeg
authored
feat: add task display mode option to start of chat streams (#2479)
Co-authored-by: Michael Brooks <[email protected]> Co-authored-by: Eden Zimbelman <[email protected]>
1 parent 16f377d commit f2ac218

2 files changed

Lines changed: 32 additions & 0 deletions

File tree

packages/web-api/src/types/request/chat.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,11 @@ export interface ChatStartStreamArguments extends TokenOverridable, Channel, Par
255255
* This is required when starting a streaming conversation outside of a DM.
256256
*/
257257
recipient_user_id?: string;
258+
/**
259+
* @description Specifies how tasks are displayed in the message. A "timeline" displays individual tasks
260+
* interleaved with text and "plan" displays all tasks together.
261+
*/
262+
task_display_mode?: string;
258263
}
259264

260265
export type ChatStopStreamArguments = TokenOverridable &

packages/web-api/test/types/methods/chat.test-d.ts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -833,6 +833,33 @@ expectAssignable<Parameters<typeof web.chat.startStream>>([
833833
},
834834
]);
835835

836+
expectAssignable<Parameters<typeof web.chat.startStream>>([
837+
{
838+
channel: 'C1234',
839+
thread_ts: '1234.56',
840+
chunks: [
841+
{
842+
type: 'markdown_text',
843+
text: 'Hello world',
844+
},
845+
{
846+
type: 'plan_update',
847+
title: 'Hello world',
848+
},
849+
{
850+
type: 'task_update',
851+
id: 'task-1',
852+
title: 'Processing request',
853+
status: 'in_progress',
854+
details: 'Working on it...',
855+
},
856+
],
857+
recipient_team_id: 'T1234',
858+
recipient_user_id: 'U1234',
859+
task_display_mode: 'timeline', // Expect to be supported
860+
},
861+
]);
862+
836863
// chat.stopStream
837864
// -- sad path
838865
expectError(web.chat.stopStream()); // lacking argument

0 commit comments

Comments
 (0)