MCPcopy Create free account
hub / github.com/anthropics/claude-code / openOver

Function openOver

mods/diff/tests/views/source-picker.test.ts:17–41  ·  view source on GitHub ↗

* The pane open and mounted in a session of that many edited turns, over * the one changed file of Fixtures.REPOSITORY; the test may swap the * transcript. A tree the engine refuses makes every read on `ui` reject.

(
    $: Engine,
    on: On,
    turns: number,
    pane: RenderInput<'Pane'> = Fixtures.PANE,
  )

Source from the content-addressed store, hash-verified

15 * transcript. A tree the engine refuses makes every read on `ui` reject.
16 */
17 async function openOver(
18 $: Engine,
19 on: On,
20 turns: number,
21 pane: RenderInput<'Pane'> = Fixtures.PANE,
22 ) {
23 const session = { transcript: Fixtures.editedTurnsOf(turns) }
24
25 const world = Fixtures.inRepository(on, Fixtures.REPOSITORY, {
26 messages: (): readonly SessionMessage[] => session.transcript,
27 })
28
29 on('tool.call', () => ({ result: 'done' }))
30 await $.session.start(Fixtures.SESSION)
31 await $.command.run(Fixtures.DIFF)
32 await world.clock.advance(Fixtures.SETTLE_MS)
33
34 const ui = await $.ui.mount({
35 ...pane,
36 plugin: 'diff',
37 surface: 'terminal',
38 })
39
40 return { session, world, ui }
41 }
42
43 /**
44 * What the picker offers, in the order drawn, over a fresh drawing:

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected