Skip to content

Commit 51a4044

Browse files
committed
Merge remote-tracking branch 'origin/main' into brandon/cli-env-filter
2 parents cd324a2 + f877ef8 commit 51a4044

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

sdk/src/__tests__/run-text-emission.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ const waitForHandler = async (): Promise<MockHandlerInstance> => {
111111

112112
const resolvePrompt = async (
113113
handler: MockHandlerInstance,
114-
extras: Partial<ClientAction<'prompt'>> = {},
114+
extras: Partial<Omit<ServerAction<'prompt-response'>, 'type' | 'promptId'>> = {},
115115
) => {
116116
const promptId =
117117
handler.lastInput?.promptId ??

sdk/src/run.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ import type { SessionState } from '../../common/src/types/session-state'
4444
import type { Source } from '../../common/src/types/source'
4545
import type { CodebuffFileSystem } from '@codebuff/common/types/filesystem'
4646

47+
type TextPrintEvent = Extract<PrintModeEvent, { type: 'text' }>
48+
4749
export type CodebuffClientOptions = {
4850
apiKey?: string
4951

@@ -141,7 +143,7 @@ export async function run({
141143
const textFilterStates = new Map<string, ToolXmlFilterState>()
142144
const textAccumulator = new Map<string, string>()
143145
const lastStreamedTextByAgent = new Map<string, string>()
144-
const lastTextEventByAgent = new Map<string, PrintModeEvent>()
146+
const lastTextEventByAgent = new Map<string, TextPrintEvent>()
145147
const sectionStartIndexByAgent = new Map<string, number>()
146148

147149
const subagentFilterStates = new Map<string, ToolXmlFilterState>()

0 commit comments

Comments
 (0)