MCPcopy Create free account
hub / github.com/anomalyco/opencode / getCurrentShell

Function getCurrentShell

packages/core/src/session/message-updater.ts:44–51  ·  view source on GitHub ↗
(callID)

Source from the content-addressed store, hash-verified

42 })
43 },
44 getCurrentShell(callID) {
45 return Effect.sync(() => {
46 const index = activeShellIndex(callID)
47 if (index < 0) return
48 const shell = state.messages[index]
49 return shell?.type === "shell" ? shell : undefined
50 })
51 },
52 updateAssistant(assistant) {
53 return Effect.sync(() => {
54 const index = assistantIndex(assistant.id)

Callers

nothing calls this directly

Calls 2

activeShellIndexFunction · 0.85
syncMethod · 0.80

Tested by

no test coverage detected