Tui onboarding (#4569)

Co-authored-by: GitHub Action <action@github.com>
This commit is contained in:
Dax
2025-11-21 00:21:06 -05:00
committed by GitHub
parent c417fec246
commit 23ea8ba1ce
23 changed files with 1253 additions and 277 deletions
@@ -10,6 +10,7 @@ import { createSimpleContext } from "./helper"
import { useToast } from "../ui/toast"
import { Provider } from "@/provider/provider"
import { useArgs } from "./args"
import { RGBA } from "@opentui/core"
export const { use: useLocal, provider: LocalProvider } = createSimpleContext({
name: "Local",
@@ -91,7 +92,7 @@ export const { use: useLocal, provider: LocalProvider } = createSimpleContext({
},
color(name: string) {
const agent = agents().find((x) => x.name === name)
if (agent?.color) return agent.color
if (agent?.color) return RGBA.fromHex(agent.color)
const index = agents().findIndex((x) => x.name === name)
return colors()[index % colors().length]
},