feat(aircoding): AirCoding V2 baseline — deterministic multi-agent architecture
Forked from OpenCode v1.17.4 with multi-agent system: - 5 agents: aircoding, scheduler, worker, architect, reviewer - Deterministic DAG scheduling engine (coordinator_tick) - Tool whitelists as hard enforcement - AirCoding validation plugin - V1 requirements: C4 docs, ADR, AGENTS.md, debug-log.md - Design documents in docs/
This commit is contained in:
68
packages/web/src/components/share/content-bash.tsx
Normal file
68
packages/web/src/components/share/content-bash.tsx
Normal file
@@ -0,0 +1,68 @@
|
||||
import style from "./content-bash.module.css"
|
||||
import { createResource, createSignal } from "solid-js"
|
||||
import { createOverflow, useShareMessages } from "./common"
|
||||
import { codeToHtml } from "shiki"
|
||||
|
||||
interface Props {
|
||||
command: string
|
||||
output: string
|
||||
description?: string
|
||||
expand?: boolean
|
||||
}
|
||||
|
||||
export function ContentBash(props: Props) {
|
||||
const messages = useShareMessages()
|
||||
const [commandHtml] = createResource(
|
||||
() => props.command,
|
||||
async (command) => {
|
||||
return codeToHtml(command || "", {
|
||||
lang: "bash",
|
||||
themes: {
|
||||
light: "github-light",
|
||||
dark: "github-dark",
|
||||
},
|
||||
})
|
||||
},
|
||||
)
|
||||
|
||||
const [outputHtml] = createResource(
|
||||
() => props.output,
|
||||
async (output) => {
|
||||
return codeToHtml(output || "", {
|
||||
lang: "console",
|
||||
themes: {
|
||||
light: "github-light",
|
||||
dark: "github-dark",
|
||||
},
|
||||
})
|
||||
},
|
||||
)
|
||||
|
||||
const [expanded, setExpanded] = createSignal(false)
|
||||
const overflow = createOverflow()
|
||||
|
||||
return (
|
||||
<div class={style.root} data-expanded={expanded() || props.expand === true ? true : undefined}>
|
||||
<div data-slot="body">
|
||||
<div data-slot="header">
|
||||
<span>{props.description}</span>
|
||||
</div>
|
||||
<div data-slot="content">
|
||||
<div innerHTML={commandHtml()} />
|
||||
<div data-slot="output" ref={overflow.ref} innerHTML={outputHtml()} />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{!props.expand && overflow.status && (
|
||||
<button
|
||||
type="button"
|
||||
data-component="text-button"
|
||||
data-slot="expand-button"
|
||||
onClick={() => setExpanded((e) => !e)}
|
||||
>
|
||||
{expanded() ? messages.show_less : messages.show_more}
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user