modscode JA

modscode / Gallery / acp-ui

acp-ui

Restyles the Claude Code terminal like an ACP chat: prompt and tool cards, inline diffs, a status band, footer stats, a /dash pane and a done toast

Code you can checkTerminal + desktopPaneBandStatus lineToastBoxButtonClientMarkdownText

What it does

  • Draws a band above the prompt, a pane, the status line, toasts
  • Adds /dash, /play, /acp-scene, /acp-theme
  • Watches tool calls and can refuse them
  • Hooks agent.spawn, prompt.submit, session.start, turn.complete and 2 more
  • Keeps its own state between turns

Good points

  • No network calls
  • Written in TypeScript
  • Writes no files

Code to start from

Two kinds: a starter modscode writes from the design above, and the lines of the mod's own code that draw it.

Starter (register.tsx)

register.tsx
import type { Register } from 'claude-code'

// Drawn like acp-ui by Nguyễn Thế Huy (pane, band, status, toast), as modscode read it from the mod's code:
// https://modscode.com/gallery/huydepzai121-acp-ui/
// Written by modscode from that reading, not copied from the mod: use it as you like.
// Each value below stands for one the mod works out at run time; put in your own.
export const register: Register = on => {
  // the band above the prompt; what else goes there is drawn under it
  on('ui.render', { component: 'AbovePrompt' }, async ($, e, next) => {
    const { Box, Client, Button, Text } = $.ui.resolve(e)
    const text = '…'
    const text2 = '…'
    const text3 = '…'
    const text4 = '…'
    const text5 = '…'
    const text6 = '…'
    const text7 = '…'
    const text8 = '…'
    const text9 = '…'
    const text10 = '…'
    const text11 = '…'
    const text12 = '…'
    const text13 = '…'
    const text14 = '…'
    const text15 = '…'
    return (
      <Box flexDirection="column">
        <Box flexDirection="column">
          <Client module="./scene.tsx" />
          <Box gap={2}>
            <Button hotkey="j" label="j nhảy" />
            <Button hotkey="q" label="q thoát" />
          </Box>
        </Box>
        <Box>
          <Text>
            <Text>
              ▐
            </Text>
            <Text>
              {text}
            </Text>
            <Text>
              {text2}
            </Text>
            <Text>
              {text3}
            </Text>
            <Text>
              ▌
            </Text>
          </Text>
          <Text>
            <Text>
              ▐
            </Text>
            <Text>
              {text4}
            </Text>
            <Text>
              {text5}
            </Text>
            <Text>
              {text6}
            </Text>
            <Text>
              ▌
            </Text>
          </Text>
          <Text>
            <Text>
              ▐
            </Text>
            <Text>
              {text7}
            </Text>
            <Text>
              {text8}
            </Text>
            <Text>
              {text9}
            </Text>
            <Text>
              ▌
            </Text>
          </Text>
          <Text>
            <Text>
              ▐
            </Text>
            <Text>
              {text10}
            </Text>
            <Text>
              {text11}
            </Text>
            <Text>
              {text12}
            </Text>
            <Text>
              ▌
            </Text>
          </Text>
          <Text>
            <Text>
              ▐
            </Text>
            <Text>
              {text13}
            </Text>
            <Text>
              {text14}
            </Text>
            <Text>
              {text15}
            </Text>
            <Text>
              ▌
            </Text>
          </Text>
          <Button plain label="✨" action="app:toggleDiffPreSession" />
        </Box>
        {await next(e)}
      </Box>
    )
  })

  // the pane: open it with $.ui.open({ id: 'my-pane', title: "Phiên làm việc" })
  on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
    const { Box, Text } = $.ui.resolve(e)
    const value = '…'
    const label = '…'
    const value2 = '…'
    const label2 = '…'
    const value3 = '…'
    const label3 = '…'
    const label4 = '…'
    const label5 = '…'
    const label6 = '…'
    const row = '…'
    const row2 = '…'
    const row3 = '…'
    const startLabel = '…'
    const text = '…'
    const name = '…'
    const filled = '…'
    const empty = '…'
    const count = '…'
    const text2 = '…'
    const name2 = '…'
    const filled2 = '…'
    const empty2 = '…'
    const count2 = '…'
    const text3 = '…'
    const name3 = '…'
    const filled3 = '…'
    const empty3 = '…'
    const count3 = '…'
    const status = '…'
    const path = '…'
    const removed = '…'
    const added = '…'
    const status2 = '…'
    const path2 = '…'
    const status3 = '…'
    const path3 = '…'
    const length = '…'
    const text4 = '…'
    const text5 = '…'
    const text6 = '…'
    const head = '…'
    return (
      <Box flexDirection="column" gap={1}>
        <Text>
          <Text>
            <Text bold>
              {value}
            </Text>
            <Text>
              {" "}
              {label}
              {" "}
            </Text>
          </Text>
          <Text>
            <Text bold>
              {value2}
            </Text>
            <Text>
              {" "}
              {label2}
              {" "}
            </Text>
          </Text>
          <Text>
            <Text bold>
              {value3}
            </Text>
            <Text>
              {" "}
              {label3}
              {" "}
            </Text>
          </Text>
        </Text>
        <Box flexDirection="column">
          <Text>
            TIMELINE
            {" "}
            <Text>
              ────────
            </Text>
          </Text>
          <Text>
            <Text>
              ▆
            </Text>
            <Text>
              ▆
            </Text>
            <Text>
              ▆
            </Text>
          </Text>
          <Text>
            <Text>
              <Text>
                ■
              </Text>
              {" "}
              {label4}
              {" "}
            </Text>
            <Text>
              <Text>
                ■
              </Text>
              {" "}
              {label5}
              {" "}
            </Text>
            <Text>
              <Text>
                ■
              </Text>
              {" "}
              {label6}
              {" "}
            </Text>
          </Text>
        </Box>
        <Box flexDirection="column">
          <Text>
            HOẠT ĐỘNG
            {" "}
            <Text>
              ────────
            </Text>
          </Text>
          <Text>
            {row}
          </Text>
          <Text>
            {row2}
          </Text>
          <Text>
            {row3}
          </Text>
          <Text>
            {startLabel}
            bây giờ
          </Text>
        </Box>
        <Box flexDirection="column">
          <Text>
            TOOL
            {" "}
            <Text>
              ────────
            </Text>
          </Text>
          <Text>
            Chưa có tool call nào.
          </Text>
          <Text>
            <Text>
              {text}
              {" "}
            </Text>
            <Text>
              {name}
            </Text>
            <Text>
              {filled}
            </Text>
            <Text>
              {empty}
            </Text>
            <Text>
              {count}
            </Text>
          </Text>
          <Text>
            <Text>
              {text2}
              {" "}
            </Text>
            <Text>
              {name2}
            </Text>
            <Text>
              {filled2}
            </Text>
            <Text>
              {empty2}
            </Text>
            <Text>
              {count2}
            </Text>
          </Text>
          <Text>
            <Text>
              {text3}
              {" "}
            </Text>
            <Text>
              {name3}
            </Text>
            <Text>
              {filled3}
            </Text>
            <Text>
              {empty3}
            </Text>
            <Text>
              {count3}
            </Text>
          </Text>
        </Box>
        <Box flexDirection="column">
          <Text>
            CHANGES
            {" "}
            <Text>
              ────────
            </Text>
          </Text>
          <Text>
            Không có thay đổi.
          </Text>
          <Text>
            <Text bold>
              {status}
              {" "}
            </Text>
            <Text>
              {path}
            </Text>
            <Text>
              {`−${removed}`}
            </Text>
            <Text>
              {`+${added}`}
            </Text>
          </Text>
          <Text>
            <Text bold>
              {status2}
              {" "}
            </Text>
            <Text>
              {path2}
            </Text>
            <Text>
              {`−${removed}`}
            </Text>
            <Text>
              {`+${added}`}
            </Text>
          </Text>
          <Text>
            <Text bold>
              {status3}
              {" "}
            </Text>
            <Text>
              {path3}
            </Text>
            <Text>
              {`−${removed}`}
            </Text>
            <Text>
              {`+${added}`}
            </Text>
          </Text>
          <Text>
            {"… "}
            {length}
            {" file nữa"}
          </Text>
        </Box>
        <Text>
          <Text>
            <Text>
              ▐
            </Text>
            <Text>
              {text4}
            </Text>
            <Text>
              {text5}
            </Text>
            <Text>
              {text6}
            </Text>
            <Text>
              ▌
            </Text>
          </Text>
          <Text>
            {" "}
            {head}
          </Text>
        </Text>
      </Box>
    )
  })

  on('session.start', async ($, e, next) => {
    await $.ui.status(`✨ đang viết lại câu lệnh…`)
    await $.ui.toast(`Không viết lại được lúc này; câu gốc đã được đặt lại vào ô nhập.`)
    await $.ui.toast(`✨ Đã viết lại — xem trong ô nhập, Enter để gửi.`)
    return next(e)
  })
}

The mod's own code

Shown under the mod's licence (MIT); its text is below. Keep the notice if you copy these lines.

plugin/hooks/register.tsx lines 1337–1394 · Band
  on('ui.render', { component: 'AbovePrompt', surface: 'terminal' }, async ($, e, next) => {
    const [repo, session, runs, sc] = await Promise.all([read($, git), read($, band), read($, agents), read($, scene)])
    const running = Object.values(runs).filter(isRunning).sort((a, b) => a.startedAt - b.startedAt)
    const sceneRows = SCENE_ROWS[sc.playing ? 'game' : 'scene']
    const showScene = sc.enabled && (e.props.isWorking || sc.playing) && e.props.maxRows >= sceneRows + 2
    if (e.props.hasSurvey || (repo === null && session === null && running.length === 0 && !showScene)) return next(e)
    const { Box, Text, Client, Button } = $.ui.resolve(e)
    const sceneProps: SceneProps = {
      mode: sc.playing ? 'game' : 'scene',
      bubble: sc.bubble || 'Đang suy nghĩ…',
      progress: sc.turnTools / (sc.turnTools + 6),
      jumpSeq: sc.jumpSeq,
      width: Math.max(30, e.props.bodyColumns - 2),
      colors: {
        cat: '#E8A35C', eye: '#1E1E1E', nose: '#F28FAD', track: C.track, trackDone: C.accent,
        star: C.yellow, bug: C.red, house: C.soft, roof: C.orange, bubbleBg: C.popup, bubbleFg: C.text, dim: C.dim,
      },
    }
    const sceneBlock = showScene ? (
      <Box flexDirection="column">
        <Client key="scene" module="./scene.tsx" props={sceneProps} height={sceneRows} />
        {sc.playing && (
          <Box gap={2}>
            <Button key="jump" hotkey="j" label="j nhảy" onPress={() => update($, scene, s => ({ ...s, jumpSeq: s.jumpSeq + 1 }))} />
            <Button key="quit" hotkey="q" label="q thoát" onPress={() => update($, scene, s => ({ ...s, playing: false }))} />
          </Box>
        )}
      </Box>
    ) : null
    const percent = session?.ctxPercent ?? null
    const bar = smoothBar((percent ?? 0) / 100, 8)

    return (
      <Box flexDirection="column">
      {sceneBlock}
      <Box>
        {repo && pill(Text, C.tagBlueBg, [{ text: `⎇ ${repo.branch}`, color: C.tagBlueFg }])}
        {repo && repo.files.length > 0 && pill(Text, C.tagYellowBg, [{ text: `${repo.files.length} file đổi`, color: C.tagYellowFg }])}
        {running.length > 0 &&
          pill(Text, C.running, [
            { text: '◆ ', color: C.violet },
            { text: `${running.length} agent: `, color: C.soft },
            { text: running.slice(0, 3).map(r => `${r.type} ◌`).join(' · '), color: C.text },
            ...(running.length > 3 ? [{ text: ` +${running.length - 3}`, color: C.dim }] : []),
          ])}
        {session && pill(Text, C.pill, [{ text: session.model, color: C.soft }])}
        {percent !== null &&
          pill(Text, C.pill, [
            { text: 'ctx ', color: C.dim },
            { text: bar.filled, color: C.accent },
            { text: bar.empty, color: C.track },
            { text: ` ${Math.round(percent)}%`, color: C.soft },
          ])}
        <Button key="enhance" plain label="✨" action={ENHANCE_ACTION} onPress={() => enhancePromptBox($)} />
      </Box>
      </Box>
    )
  })
plugin/hooks/register.tsx lines 359–369 · Band
function pill(Text: TextEl, bg: string, segs: Seg[]): RenderElement {
  return (
    <Text>
      <Text color={bg}>▐</Text>
      {segs.map(s => (
        <Text backgroundColor={bg} color={s.color} bold={s.bold}>{s.text}</Text>
      ))}
      <Text color={bg}>▌</Text>
    </Text>
  )
}
plugin/hooks/register.tsx lines 1450–1555 · Pane
  on('ui.render', { component: 'Pane', requestId: DASH }, async ($, e) => {
    const { Box, Text } = $.ui.resolve(e)
    const [s, repo, beatList, counts, now] = await Promise.all([
      read($, stats), read($, git), read($, beats), read($, activity), $.clock.now(),
    ])
    const files = repo?.files ?? []
    const added = files.reduce((sum, f) => sum + f.added, 0)
    const removed = files.reduce((sum, f) => sum + f.removed, 0)
    const ranked = Object.entries(s.tools).sort((a, b) => b[1] - a[1]).slice(0, 6)
    const top = ranked[0]?.[1] ?? 1
    const width = Math.max(24, Math.min(e.props.bodyColumns - 2, 48))
    const barWidth = Math.max(6, width - 16)
    const pathWidth = Math.max(8, Math.min(width - 14, Math.max(0, ...files.map(f => cells(f.path)))))
    const tiles: Array<[string, string, string]> = [
      [String(s.total), 'tool call', C.text],
      [`+${added}`, 'dòng thêm', C.green],
      [`−${removed}`, 'dòng xoá', C.red],
    ]

    // Tool calls per minute over the last `columns` minutes, 4 rows tall.
    const columns = Math.max(6, Math.min(24, Math.floor(width / 2)))
    const nowMinute = Math.floor(now / 60000)
    const perMinute = Array.from({ length: columns }, (_, i) => counts[String(nowMinute - columns + 1 + i)] ?? 0)
    const peak = Math.max(1, ...perMinute)
    const chartRows = [3, 2, 1, 0].map(level =>
      perMinute.map(v => LEVELS[Math.max(0, Math.min(8, Math.round((v / peak) * 32) - level * 8))] ?? ' ').join(' '),
    )
    const firstMinute = new Date((nowMinute - columns + 1) * 60000)
    const startLabel = `${String(firstMinute.getHours()).padStart(2, '0')}:${String(firstMinute.getMinutes()).padStart(2, '0')}`
    const shownBeats = beatList.slice(-width)

    return (
      <Box flexDirection="column" gap={1}>
        {width >= 38 ? (
          <Box gap={1}>
            {tiles.map(([value, label, color]) =>
              card(Box, Text, C.snippet, 12, [
                paint(Text, C.snippet, 12, [{ text: value, color, bold: true }]),
                paint(Text, C.snippet, 12, [{ text: label, color: C.dim }]),
              ], 0),
            )}
          </Box>
        ) : (
          <Text>
            {tiles.map(([value, label, color]) => (
              <Text><Text bold color={color}>{value}</Text><Text color={C.dim}> {label}  </Text></Text>
            ))}
          </Text>
        )}
        <Box flexDirection="column">
          {section(Text, 'TIMELINE', width)}
          {shownBeats.length === 0 ? (
            <Text color={C.faint}>Chưa có hoạt động.</Text>
          ) : (
            <Text>{shownBeats.map(b => <Text color={beatColor(b)}>▆</Text>)}</Text>
          )}
          <Text color={C.dim}>
            {BEAT_LABEL.map(([b, label]) => (
              <Text><Text color={beatColor(b)}>■</Text> {label} </Text>
            ))}
          </Text>
        </Box>
        <Box flexDirection="column">
          {section(Text, 'HOẠT ĐỘNG', width, `${columns} phút`)}
          {chartRows.map(row => <Text color={C.accent}>{row}</Text>)}
          <Text color={C.faint}>{startLabel.padEnd(columns * 2 - 8)}bây giờ</Text>
        </Box>
        <Box flexDirection="column">
          {section(Text, 'TOOL', width)}
          {ranked.length === 0 && <Text color={C.faint}>Chưa có tool call nào.</Text>}
          {ranked.map(([name, count]) => {
            const bar = smoothBar(count / top, barWidth)
            const icon = iconOf(kindOf(name))
            return (
              <Text>
                <Text color={icon.color}>{icon.text} </Text>
                <Text color={C.text}>{fit(name, 6).padEnd(7)}</Text>
                <Text color={C.accent}>{bar.filled}</Text>
                <Text color={C.pill}>{bar.empty}</Text>
                <Text color={C.soft}>{String(count).padStart(4)}</Text>
              </Text>
            )
          })}
        </Box>
        <Box flexDirection="column">
          {section(Text, 'CHANGES', width)}
          {files.length === 0 && <Text color={C.faint}>Không có thay đổi.</Text>}
          {files.slice(0, 12).map(f => (
            <Text key={`file-${f.path}`}>
              <Text bold color={statusColor(f.status)}>{f.status} </Text>
              <Text color={C.text}>{fit(f.path, pathWidth).padEnd(pathWidth)}</Text>
              <Text color={C.red}>{`−${f.removed}`.padStart(5)}</Text>
              <Text color={C.green}>{`+${f.added}`.padStart(5)}</Text>
            </Text>
          ))}
          {files.length > 12 && <Text color={C.faint}>… {files.length - 12} file nữa</Text>}
        </Box>
        {repo && (
          <Text>
            {pill(Text, C.tagBlueBg, [{ text: `⎇ ${repo.branch}`, color: C.tagBlueFg }])}
            <Text color={C.dim}> {repo.head}</Text>
          </Text>
        )}
      </Box>
    )
  })
plugin/hooks/register.tsx lines 349–357 · Pane
function card(Box: BoxEl, Text: TextEl, bg: string, width: number, rows: RenderElement[], marginTop = 1): RenderElement {
  return (
    <Box flexDirection="column" marginTop={marginTop}>
      {edgeTop(Text, bg, width)}
      {rows}
      {edgeBottom(Text, bg, width)}
    </Box>
  )
}
plugin/hooks/register.tsx lines 341–343 · Pane
const edgeTop = (Text: TextEl, bg: string, width: number): RenderElement => (
  <Text color={bg}>{`▗${'▄'.repeat(Math.max(0, width - 2))}▖`}</Text>
)
plugin/hooks/register.tsx lines 345–347 · Pane
const edgeBottom = (Text: TextEl, bg: string, width: number): RenderElement => (
  <Text color={bg}>{`▝${'▀'.repeat(Math.max(0, width - 2))}▘`}</Text>
)
Licence text (MIT)
MIT License

Copyright (c) 2026 Nguyễn Thế Huy

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

What its code calls

runs programsdrives Claudetool callsremembers

The design, read from code

Drawn from the mod's source at the commit read, not from a run: a list is drawn three times, a condition takes its first branch that draws in the desktop app, and a value only the run time knows is shown as a made-up sample (dotted underline) or left out. Colours and type are this site's.

What its code shows

Read from the source at commit 7cdf168388f9 on 2026-10-06. The first group decides whether a mod is listed; the rest is for you to weigh. A later commit is not read until the next crawl.

Decides the listing: code you can check
Entry readEvery module hooks/hooks.json names was read.plugin/hooks/register.tsx
ParsesEvery file parses as TypeScript or JavaScript.2 files parsed
All its code is in the modEvery import is a file of the mod or the engine's own module; no packages, no require.all its code is in the mod
ReadableNo minified lines, no eval or new Function, no import of a computed path, no encoded blobs.no minified code, no eval, no encoded blobs
Calls in the openNetwork and programs are reached as $.http.fetch and $.process.run in place, never passed around.every call outside goes through $ in the open
For you to weigh before installing
Where it drawsThe terminal, the desktop app, both, or nothing (hooks only: a guard or a prompt rewriter), as its code says. Shown, never a reason to leave a mod out.draws in the terminal and the desktop app, with its own branch for the desktop
Install lineWhether its repository's own .claude-plugin/marketplace.json lists it, so it installs from that marketplace with the lines on its page.listed in its repository's .claude-plugin/marketplace.json: installs from there
Programs on WindowsWhether every program it starts through $.process exists on Windows (tail, date, open, osascript, /usr/… do not).runs no program a Windows PC lacks
NetworkWhether every fetch names its https host in the code.no network
ProgramsWhether every program it starts is named in the code and is not a shell, an interpreter or a network tool.git (reaches the network)
Reads and sendsWhether it both reads files or environment variables and reaches the network.reaches the network, but reads no files and no environment variables
Keys in the sourceWhether the source holds what looks like an API key or a private key.no keys in the source
LicenceAn open licence (MIT, Apache-2.0, BSD, ISC, Unlicense, 0BSD, CC0) with its text lets modscode show its code; otherwise the code is linked.MIT

This is a reading of the code text, not a security review: it does not run the mod, and it cannot see what a program the mod starts does. The check before installing is yours. How mods are chosen

Install it

Check it yourself before you install it. Mods run unsandboxed, with your permissions, and modscode does not vouch for what this code does. Read the code below (or run claude plugin validate . in its folder), weigh what it reaches, and install the commit you read.

Its repository is its marketplace. Add that marketplace (in the terminal with these commands, or in the desktop app's plugin settings) and install the mod from it:

/plugin marketplace add huydepzai121/claude-acp-ui
/plugin install acp-ui@claude-acp-ui

This installs the marketplace's latest commit, which may not be the one read here (7cdf168388f9). Compare them before you install.

Ask Claude about it

With the modscode connector added, Claude can read this design, what its code reaches and its code, and build on them. Ask it like this:

Read the modscode design "huydepzai121-acp-ui" with its code and make me a pane like it

Search them from Claude: the MCP connector

Similar designs