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

Function codeKind

packages/session-ui/src/components/markdown.tsx:176–180  ·  view source on GitHub ↗
(language: string | undefined)

Source from the content-addressed store, hash-verified

174const shellLanguages = new Set(["bash", "sh", "shell", "zsh", "fish", "console", "terminal"])
175
176function codeKind(language: string | undefined) {
177 const value = language?.toLowerCase()
178 if (!value) return
179 if (shellLanguages.has(value)) return "shell"
180}
181
182function codeLanguage(block: HTMLPreElement) {
183 const code = block.querySelector("code")

Callers 1

applyCodeMetadataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected