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 - System prompt injection for routing - V1 requirements: C4 docs, ADR, AGENTS.md, debug-log.md - Design documents in docs/
This commit is contained in:
22
packages/tui/test/context/local.test.ts
Normal file
22
packages/tui/test/context/local.test.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { expect, test } from "bun:test"
|
||||
import { parseModel, recentModels } from "../../src/context/local"
|
||||
|
||||
test("parses model IDs containing slashes", () => {
|
||||
expect(parseModel("provider/family/model")).toEqual({
|
||||
providerID: "provider",
|
||||
modelID: "family/model",
|
||||
})
|
||||
})
|
||||
|
||||
test("moves a model to the front, deduplicates, and limits recents", () => {
|
||||
const recent = Array.from({ length: 12 }, (_, index) => ({
|
||||
providerID: "provider",
|
||||
modelID: `model-${index}`,
|
||||
}))
|
||||
|
||||
expect(recentModels({ providerID: "provider", modelID: "model-5" }, recent)).toEqual([
|
||||
{ providerID: "provider", modelID: "model-5" },
|
||||
...recent.slice(0, 5),
|
||||
...recent.slice(6, 10),
|
||||
])
|
||||
})
|
||||
Reference in New Issue
Block a user