MCPcopy Create free account
hub / github.com/TraderAlice/OpenAlice / FileContentView

Function FileContentView

ui/src/components/FileContentView.tsx:21–30  ·  view source on GitHub ↗
({
  path,
  result,
}: {
  path: string
  result: ReadFileResult
})

Source from the content-addressed store, hash-verified

19import type { ReadFileResult } from './workspace/api'
20
21export function FileContentView({
22 path,
23 result,
24}: {
25 path: string
26 result: ReadFileResult
27}): ReactElement {
28 if (result.kind === 'ok') return <DocBody path={path} content={result.content} />
29 return <DocTombstone result={result} />
30}
31
32function DocBody({ path, content }: { path: string; content: string }): ReactElement {
33 const lower = path.toLowerCase()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected