MCPcopy Index your code
hub / github.com/anomalyco/opencode / runInteractiveMode

Function runInteractiveMode

packages/opencode/src/cli/cmd/run/runtime.ts:787–814  ·  view source on GitHub ↗
(
  input: RunInput & { createSession?: CreateSession },
  deps?: RunRuntimeDeps,
)

Source from the content-addressed store, hash-verified

785
786// Attach mode. Uses the caller-provided SDK client directly.
787export async function runInteractiveMode(
788 input: RunInput & { createSession?: CreateSession },
789 deps?: RunRuntimeDeps,
790): Promise<void> {
791 return runInteractiveRuntime(
792 {
793 files: input.files,
794 initialInput: input.initialInput,
795 thinking: input.thinking,
796 backgroundSubagents: input.backgroundSubagents,
797 replay: input.replay,
798 replayLimit: input.replayLimit,
799 demo: input.demo,
800 boot: async () => ({
801 sdk: input.sdk,
802 directory: input.directory,
803 sessionID: input.sessionID,
804 sessionTitle: input.sessionTitle,
805 resume: input.resume,
806 agent: input.agent,
807 model: input.model,
808 variant: input.variant,
809 }),
810 createSession: createSessionResolver(input.createSession),
811 },
812 deps,
813 )
814}

Callers 2

runtime.test.tsFile · 0.90
executeFunction · 0.85

Calls 2

runInteractiveRuntimeFunction · 0.85
createSessionResolverFunction · 0.85

Tested by

no test coverage detected