|
|
@@ -4905,7 +4905,7 @@ describe('terminal mounting', () => {
|
|
|
const session = ctx.sessions.create(SessionId('main'))
|
|
|
ctx.agents.register({
|
|
|
id: session.id, options: {}, session, inbox: new Inbox(session), status: 'idle', ctx,
|
|
|
- followup: () => {}, steer: () => {}, inject: () => {}, cancel() {}, whenIdle: () => Promise.resolve(),
|
|
|
+ send: () => {}, followup: () => {}, steer: () => {}, inject: () => {}, cancel() {}, whenIdle: () => Promise.resolve(),
|
|
|
})
|
|
|
const terminal = new FakeTerminal()
|
|
|
mountTui(ctx, { theme: { color: false } }, { terminal, exit: vi.fn() })
|
|
|
@@ -4930,7 +4930,7 @@ describe('terminal mounting', () => {
|
|
|
const session = ctx.sessions.create(SessionId('main'))
|
|
|
ctx.agents.register({
|
|
|
id: session.id, options: {}, session, inbox: new Inbox(session), status: 'idle', ctx,
|
|
|
- followup: () => {}, steer: () => {}, inject: () => {}, cancel() {}, whenIdle: () => Promise.resolve(),
|
|
|
+ send: () => {}, followup: () => {}, steer: () => {}, inject: () => {}, cancel() {}, whenIdle: () => Promise.resolve(),
|
|
|
})
|
|
|
const terminal = new FakeTerminal()
|
|
|
// Mirror dsh-tui's own inject (minus loader, the absence under test).
|
|
|
@@ -4965,14 +4965,14 @@ describe('terminal mounting', () => {
|
|
|
const otherSession = ctx.sessions.create(SessionId('other-session'))
|
|
|
ctx.agents.register({
|
|
|
id: otherSession.id, options: {}, session: otherSession, inbox: new Inbox(otherSession), status: 'idle', ctx,
|
|
|
- followup: () => {}, steer: () => {}, inject: () => {}, cancel() {}, whenIdle: () => Promise.resolve(),
|
|
|
+ send: () => {}, followup: () => {}, steer: () => {}, inject: () => {}, cancel() {}, whenIdle: () => Promise.resolve(),
|
|
|
})
|
|
|
expect(terminal.started).toBe(0)
|
|
|
|
|
|
const session = ctx.sessions.create(SessionId('late-session'))
|
|
|
const agent = {
|
|
|
id: session.id, options: {}, session, inbox: new Inbox(session), status: 'idle', ctx,
|
|
|
- followup: () => {}, steer: () => {}, inject: () => {}, cancel() {}, whenIdle: () => Promise.resolve(),
|
|
|
+ send: () => {}, followup: () => {}, steer: () => {}, inject: () => {}, cancel() {}, whenIdle: () => Promise.resolve(),
|
|
|
} as Agent
|
|
|
ctx.agents.register(agent)
|
|
|
await tick()
|
|
|
@@ -5003,7 +5003,7 @@ describe('terminal mounting', () => {
|
|
|
const session = ctx.sessions.create(SessionId('main-session'))
|
|
|
ctx.agents.register({
|
|
|
id: session.id, options: {}, session, inbox: new Inbox(session), status: 'idle', ctx,
|
|
|
- followup: () => {}, steer: () => {}, inject: () => {}, cancel() {}, whenIdle: () => Promise.resolve(),
|
|
|
+ send: () => {}, followup: () => {}, steer: () => {}, inject: () => {}, cancel() {}, whenIdle: () => Promise.resolve(),
|
|
|
})
|
|
|
await tick()
|
|
|
expect(terminal.started).toBe(0)
|
|
|
@@ -5047,7 +5047,7 @@ describe('terminal mounting', () => {
|
|
|
session.append('step/start', { turn: 1, step: 1 })
|
|
|
ctx.agents.register({
|
|
|
id: session.id, options: {}, session, inbox: new Inbox(session), status: 'running', ctx,
|
|
|
- followup: () => {}, steer: () => {}, inject: () => {}, cancel() {}, whenIdle: () => Promise.resolve(),
|
|
|
+ send: () => {}, followup: () => {}, steer: () => {}, inject: () => {}, cancel() {}, whenIdle: () => Promise.resolve(),
|
|
|
})
|
|
|
const terminal = new FakeTerminal()
|
|
|
terminal.start = () => { throw new Error('terminal startup failed') }
|