): (SessionAction | ChatAction)[] {
if (params.item.type === 'agentMessage') {
state.itemToPartId.set(params.item.id, partId);
return [
{
type: ActionType.ChatResponsePart,
turnId: params.turnId,
part: {
kind: ResponsePartKind.Markdown,
id: partId,
content: params.item.text ?? '',
},
},
];
}
if (params.item.type === 'commandExecution') {
// Phase 4: surface shell commands as tool calls. We allocate a