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

Function TargetSessionRoute

packages/app/src/app.tsx:94–111  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

92}
93
94const TargetSessionRoute = () => {
95 const params = useParams<{ serverKey: string; id: string }>()
96 const global = useGlobal()
97 const conn = createMemo(() => {
98 const key = requireServerKey(params.serverKey)
99 return global.servers.list().find((item) => ServerConnection.key(item) === key)
100 })
101
102 return (
103 <Show when={requireServerKey(params.serverKey)} keyed>
104 <ServerSDKProvider server={conn}>
105 <ServerSyncProvider server={conn}>
106 <TargetSessionRouteContent />
107 </ServerSyncProvider>
108 </ServerSDKProvider>
109 </Show>
110 )
111}
112
113// Wraps the non-draft routes. They are gated on (and keyed to) the globally selected
114// server via ServerKey, then provide the server-scoped shell (Permission/Layout/

Callers

nothing calls this directly

Calls 4

requireServerKeyFunction · 0.90
findMethod · 0.65
listMethod · 0.65
keyMethod · 0.45

Tested by

no test coverage detected