Skip to content

Commit de156a2

Browse files
committed
fixes
1 parent 9b8ad56 commit de156a2

File tree

5 files changed

+11
-13
lines changed

5 files changed

+11
-13
lines changed

examples/demo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ async function main() {
2626
case 'started':
2727
case 'paused':
2828
case 'stopped':
29-
log = `agent ${status.status} - live: ${status.sessionLiveUrl}`;
29+
log = `agent ${status.status} - live: ${status.session.liveUrl}`;
3030

3131
await new Promise((resolve) => setTimeout(resolve, 2000));
3232
break;

examples/stream-zod.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ async function main() {
3737
for await (const msg of stream) {
3838
// Regular
3939
process.stdout.write(`${msg.data.status}`);
40-
if (msg.data.sessionLiveUrl) {
41-
process.stdout.write(` | Live URL: ${msg.data.sessionLiveUrl}`);
40+
if (msg.data.session.liveUrl) {
41+
process.stdout.write(` | Live URL: ${msg.data.session.liveUrl}`);
4242
}
4343

4444
if (msg.data.steps.length > 0) {

examples/zod.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ async function main() {
4646
const steps = `${stepsCount} steps`;
4747
const lastGoalDescription = stepsCount > 0 ? status.steps![stepsCount - 1]!.nextGoal : undefined;
4848
const lastGoal = lastGoalDescription ? `, last: ${lastGoalDescription}` : '';
49-
const liveUrl = status.sessionLiveUrl ? `, live: ${status.sessionLiveUrl}` : '';
49+
const liveUrl = status.session.liveUrl ? `, live: ${status.session.liveUrl}` : '';
5050

5151
log = `agent ${status.status} (${steps}${lastGoal}${liveUrl}) `;
5252

src/lib/bin/commands/listen.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,7 @@ export const listen = new Command('listen')
5151

5252
const tasks: BrowserUse.Tasks.TaskItemView[] = await client.tasks
5353
.list(
54-
{
55-
includeOutputFiles: false,
56-
includeSteps: false,
57-
includeUserUploadedFiles: false,
58-
pageSize: 10,
59-
},
54+
{ pageSize: 10 },
6055
{
6156
signal: tickRef.abort.signal,
6257
},

src/lib/stream.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export function reducer(state: BrowserState, action: BrowserAction): [BrowserSta
2323
// INIT
2424

2525
if (state == null) {
26-
const liveUrl = action.status.sessionLiveUrl ?? null;
26+
const liveUrl = action.status.session.liveUrl ?? null;
2727
const doneOutput = action.status.doneOutput ?? null;
2828

2929
const state: BrowserState = {
@@ -39,7 +39,7 @@ export function reducer(state: BrowserState, action: BrowserAction): [BrowserSta
3939

4040
// UPDATE
4141

42-
const liveUrl = action.status.sessionLiveUrl ?? state.liveUrl;
42+
const liveUrl = action.status.session.liveUrl ?? state.liveUrl;
4343
const doneOutput = action.status.doneOutput ?? state.doneOutput;
4444

4545
const steps: TaskStepView[] = [...state.steps];
@@ -68,7 +68,10 @@ export function reducer(state: BrowserState, action: BrowserAction): [BrowserSta
6868
const update: ReducerEvent = {
6969
...action.status,
7070
steps: newState.steps,
71-
sessionLiveUrl: newState.liveUrl,
71+
session: {
72+
...action.status.session,
73+
liveUrl: newState.liveUrl,
74+
},
7275
doneOutput: newState.doneOutput,
7376
};
7477

0 commit comments

Comments
 (0)