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

Function execRead

packages/opencode/src/session/prompt.ts:814–828  ·  view source on GitHub ↗
(args: Parameters<typeof read.execute>[0], extra?: Tool.Context["extra"])

Source from the content-addressed store, hash-verified

812
813 const { read } = yield* registry.named()
814 const execRead = (args: Parameters<typeof read.execute>[0], extra?: Tool.Context["extra"]) => {
815 const controller = new AbortController()
816 return read
817 .execute(args, {
818 sessionID: input.sessionID,
819 abort: controller.signal,
820 agent: input.agent!,
821 messageID: info.id,
822 extra: { bypassCwdCheck: true, ...extra },
823 messages: [],
824 metadata: () => Effect.void,
825 ask: () => Effect.void,
826 })
827 .pipe(Effect.onInterrupt(() => Effect.sync(() => controller.abort())))
828 }
829
830 if (mime === "text/plain") {
831 let offset: number | undefined

Callers 1

prompt.tsFile · 0.85

Calls 3

syncMethod · 0.80
executeMethod · 0.65
abortMethod · 0.45

Tested by

no test coverage detected