Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
5a174ba
🤖 feat: improve agent definitions with markdown files and docs genera…
ammar-agent Dec 29, 2025
9bcf5d2
fix: include builtinAgents/*.md in dist/ for production builds
ammar-agent Dec 29, 2025
c0dc218
fix: revert to hardcoded built-in agents for ESM/CJS compatibility
ammar-agent Dec 29, 2025
f8c71d3
feat: redesign agent picker as dropdown with Cmd/Ctrl+N shortcuts
ammar-agent Dec 30, 2025
7a6da17
fix: remove redundant policy.base from built-in agents
ammar-agent Dec 30, 2025
8e82c7c
refactor: address review comments - remove cyclical plan base, fix ex…
ammar-agent Dec 30, 2025
f182a86
docs: update agents.mdx for simplified schema
ammar-agent Dec 30, 2025
c107c6b
refactor: rename ai.modelString to ai.model in agent schema
ammar-agent Dec 30, 2025
b2b9b21
refactor: simplify AgentModePicker to dropdown-only UI
ammar-agent Dec 30, 2025
2dff2b3
refactor: simplify isPlanLike to check tools instead of inheritance
ammar-agent Dec 30, 2025
ad94a91
fix: generate built-in agent content at build time
ammar-agent Dec 30, 2025
3fe9917
refactor: use add/remove syntax for agent tool configuration
ammar-agent Dec 30, 2025
a329f90
fix: show resolved tool list in settings instead of add/remove counts
ammar-agent Dec 30, 2025
29d7cf0
refactor: add subagent.prompt field for conditional system prompt inj…
ammar-agent Dec 30, 2025
2cd148e
feat: restore Cmd/Ctrl+1-9 quick-select in agent picker
ammar-agent Dec 30, 2025
0d3ff94
feat: derive chat input focus border from agent color
ammar-agent Dec 30, 2025
c073dda
fix: make resolveAgentProperty type-safe with keyof constraint
ammar-agent Dec 30, 2025
1b6e73f
fix: use wildcard tool pattern to allow MCP tools
ammar-agent Dec 30, 2025
74218e3
fix: properly handle wildcard + remove patterns in agentHasTool
ammar-agent Dec 30, 2025
e7d8684
feat: add Ask agent, refresh button, and per-agent help indicators
ammar-agent Dec 30, 2025
bbaa17f
fix: add Ask to built-in agents sources and fix UI tests
ammar-agent Dec 31, 2025
43af3a4
refactor: rename subagent.prompt to subagent.append_prompt
ammar-agent Dec 31, 2025
e1134ea
feat: enhance agent selector tooltips
ammar-agent Dec 31, 2025
c2bb36c
feat: show full tool patterns and source in agent tooltips
ammar-agent Dec 31, 2025
b9bad2f
fix: correct tool configs for plan and ask agents
ammar-agent Dec 31, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions .storybook/mocks/orpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ export function createMockORPCClient(options: MockORPCClientOptions = {}): APICl
description: "Create a plan before coding",
uiSelectable: true,
subagentRunnable: false,
policyBase: "plan",
base: "plan",
},
{
id: "exec",
Expand All @@ -193,7 +193,6 @@ export function createMockORPCClient(options: MockORPCClientOptions = {}): APICl
description: "Implement changes in the repository",
uiSelectable: true,
subagentRunnable: true,
policyBase: "exec",
},
{
id: "compact",
Expand All @@ -202,7 +201,6 @@ export function createMockORPCClient(options: MockORPCClientOptions = {}): APICl
description: "History compaction (internal)",
uiSelectable: false,
subagentRunnable: false,
policyBase: "compact",
},
{
id: "explore",
Expand All @@ -211,7 +209,7 @@ export function createMockORPCClient(options: MockORPCClientOptions = {}): APICl
description: "Read-only repository exploration",
uiSelectable: false,
subagentRunnable: true,
policyBase: "exec",
base: "exec",
},
] satisfies AgentDefinitionDescriptor[]);

Expand Down Expand Up @@ -332,10 +330,11 @@ export function createMockORPCClient(options: MockORPCClientOptions = {}): APICl
frontmatter: {
name: descriptor.name,
description: descriptor.description,
base: descriptor.base,
ui: { selectable: descriptor.uiSelectable },
subagent: { runnable: descriptor.subagentRunnable },
ai: descriptor.aiDefaults,
policy: { base: descriptor.policyBase, tools: descriptor.toolFilter },
tools: descriptor.tools,
},
body: "",
} satisfies AgentDefinitionPackage;
Expand Down
29 changes: 14 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ ifeq (,$(filter -j%,$(MAKEFLAGS)))
MAKEFLAGS += -j
endif

# Common esbuild flags for CLI API bundle (ESM format for trpc-cli)
ESBUILD_CLI_FLAGS := --bundle --format=esm --platform=node --target=node20 --outfile=dist/cli/api.mjs --external:zod --external:commander --external:@trpc/server --banner:js='import { createRequire } from "module"; const require = createRequire(import.meta.url);'

# Include formatting rules
include fmt.mk

Expand Down Expand Up @@ -139,13 +142,13 @@ dev: node_modules/.installed build-main ## Start development server (Vite + node
# https://github.com/oven-sh/bun/issues/18275
@MUX_DISABLE_TELEMETRY=$(if $(MUX_ENABLE_TELEMETRY_IN_DEV),,$(or $(MUX_DISABLE_TELEMETRY),1)) NODE_OPTIONS="--max-old-space-size=4096" npm x concurrently -k --raw \
"bun x nodemon --watch src --watch tsconfig.main.json --watch tsconfig.json --ext ts,tsx,json --ignore dist --ignore node_modules --exec node scripts/build-main-watch.js" \
"npx esbuild src/cli/api.ts --bundle --format=esm --platform=node --target=node20 --outfile=dist/cli/api.mjs --external:zod --external:commander --external:@trpc/server --banner:js='import { createRequire } from \"module\"; const require = createRequire(import.meta.url);' --watch" \
"npx esbuild src/cli/api.ts $(ESBUILD_CLI_FLAGS) --watch" \
"vite"
else
dev: node_modules/.installed build-main build-preload ## Start development server (Vite + tsgo watcher for 10x faster type checking)
@MUX_DISABLE_TELEMETRY=$(if $(MUX_ENABLE_TELEMETRY_IN_DEV),,$(or $(MUX_DISABLE_TELEMETRY),1)) bun x concurrently -k \
"bun x concurrently \"$(TSGO) -w -p tsconfig.main.json\" \"bun x tsc-alias -w -p tsconfig.main.json\"" \
"bun x esbuild src/cli/api.ts --bundle --format=esm --platform=node --target=node20 --outfile=dist/cli/api.mjs --external:zod --external:commander --external:@trpc/server --banner:js='import { createRequire } from \"module\"; const require = createRequire(import.meta.url);' --watch" \
"bun x esbuild src/cli/api.ts $(ESBUILD_CLI_FLAGS) --watch" \
"vite"
endif

Expand All @@ -159,7 +162,7 @@ dev-server: node_modules/.installed build-main ## Start server mode with hot rel
@# On Windows, use npm run because bunx doesn't correctly pass arguments
@MUX_DISABLE_TELEMETRY=$(if $(MUX_ENABLE_TELEMETRY_IN_DEV),,$(or $(MUX_DISABLE_TELEMETRY),1)) npmx concurrently -k \
"npmx nodemon --watch src --watch tsconfig.main.json --watch tsconfig.json --ext ts,tsx,json --ignore dist --ignore node_modules --exec node scripts/build-main-watch.js" \
"npx esbuild src/cli/api.ts --bundle --format=esm --platform=node --target=node20 --outfile=dist/cli/api.mjs --external:zod --external:commander --external:@trpc/server --banner:js='import { createRequire } from \"module\"; const require = createRequire(import.meta.url);' --watch" \
"npx esbuild src/cli/api.ts $(ESBUILD_CLI_FLAGS) --watch" \
"npmx nodemon --watch dist/cli/index.js --watch dist/cli/server.js --delay 500ms --exec \"node dist/cli/index.js server --host $(or $(BACKEND_HOST),localhost) --port $(or $(BACKEND_PORT),3000)\"" \
"$(SHELL) -lc \"MUX_VITE_HOST=$(or $(VITE_HOST),127.0.0.1) MUX_VITE_PORT=$(or $(VITE_PORT),5173) VITE_BACKEND_URL=http://$(or $(BACKEND_HOST),localhost):$(or $(BACKEND_PORT),3000) vite\""
else
Expand All @@ -171,7 +174,7 @@ dev-server: node_modules/.installed build-main ## Start server mode with hot rel
@echo "For remote access: make dev-server VITE_HOST=0.0.0.0 BACKEND_HOST=0.0.0.0"
@MUX_DISABLE_TELEMETRY=$(if $(MUX_ENABLE_TELEMETRY_IN_DEV),,$(or $(MUX_DISABLE_TELEMETRY),1)) bun x concurrently -k \
"bun x concurrently \"$(TSGO) -w -p tsconfig.main.json\" \"bun x tsc-alias -w -p tsconfig.main.json\"" \
"bun x esbuild src/cli/api.ts --bundle --format=esm --platform=node --target=node20 --outfile=dist/cli/api.mjs --external:zod --external:commander --external:@trpc/server --banner:js='import { createRequire } from \"module\"; const require = createRequire(import.meta.url);' --watch" \
"bun x esbuild src/cli/api.ts $(ESBUILD_CLI_FLAGS) --watch" \
"bun x nodemon --watch dist/cli/index.js --watch dist/cli/server.js --delay 500ms --exec 'NODE_ENV=development node dist/cli/index.js server --host $(or $(BACKEND_HOST),localhost) --port $(or $(BACKEND_PORT),3000)'" \
"MUX_VITE_HOST=$(or $(VITE_HOST),127.0.0.1) MUX_VITE_PORT=$(or $(VITE_PORT),5173) VITE_BACKEND_URL=http://$(or $(BACKEND_HOST),localhost):$(or $(BACKEND_PORT),3000) vite"
endif
Expand All @@ -186,24 +189,20 @@ build: node_modules/.installed src/version.ts build-renderer build-main build-pr

build-main: node_modules/.installed dist/cli/index.js dist/cli/api.mjs ## Build main process

dist/cli/index.js: src/cli/index.ts src/desktop/main.ts src/cli/server.ts src/version.ts tsconfig.main.json tsconfig.json $(TS_SOURCES)
BUILTIN_AGENTS_GENERATED := src/node/services/agentDefinitions/builtInAgentContent.generated.ts

$(BUILTIN_AGENTS_GENERATED): src/node/builtinAgents/*.md scripts/generate-builtin-agents.sh
@./scripts/generate-builtin-agents.sh

dist/cli/index.js: src/cli/index.ts src/desktop/main.ts src/cli/server.ts src/version.ts tsconfig.main.json tsconfig.json $(TS_SOURCES) $(BUILTIN_AGENTS_GENERATED)
@echo "Building main process..."
@NODE_ENV=production $(TSGO) -p tsconfig.main.json
@NODE_ENV=production bun x tsc-alias -p tsconfig.main.json

# Build API CLI as ESM bundle (trpc-cli requires ESM with top-level await)
dist/cli/api.mjs: src/cli/api.ts src/cli/proxifyOrpc.ts $(TS_SOURCES)
@echo "Building API CLI (ESM)..."
@bun x esbuild src/cli/api.ts \
--bundle \
--format=esm \
--platform=node \
--target=node20 \
--outfile=dist/cli/api.mjs \
--banner:js='import { createRequire } from "module"; const require = createRequire(import.meta.url);' \
--external:zod \
--external:commander \
--external:@trpc/server
@bun x esbuild src/cli/api.ts $(ESBUILD_CLI_FLAGS)

build-preload: node_modules/.installed dist/preload.js ## Build preload script

Expand Down
Loading
Loading