From 4bd28938642414553172eae905185867547f5b80 Mon Sep 17 00:00:00 2001
From: Gemini AI
- Fork of CodeNomad by OpenCode
+ NomadArch is an enhanced fork of CodeNomad ā now with GLM 4.7, multi-model support, and MULTIX Mode
- Features ā¢
- AI Models ā¢
- Installation ā¢
- Usage ā¢
- What's New ā¢
- Credits
+ Features ā¢
+ AI Models ā¢
+ Installation ā¢
+ Usage ā¢
+ What's New ā¢
+ Credits
NomadArch - Advanced AI Coding Workspace
+šļø NomadArch
+
+Advanced AI Coding Workspace
š Z.AI Models
-#### Z.AI
| Model | Context | Specialty |
|-------|---------|-----------|
| **GLM 4.7** | 128K | Web Development, Coding |
| GLM 4.6 | 128K | General Coding |
| GLM-4 | 128K | Versatile |
-#### Anthropic
+š£ Anthropic Models
+
| Model | Context | Specialty |
|-------|---------|-----------|
| Claude 3.7 Sonnet | 200K | Complex Reasoning |
| Claude 3.5 Sonnet | 200K | Balanced Performance |
| Claude 3 Opus | 200K | Maximum Quality |
-#### OpenAI
+š¢ OpenAI Models
+
| Model | Context | Specialty |
|-------|---------|-----------|
| GPT-5 Preview | 200K | Latest Capabilities |
| GPT-4.1 | 128K | Production Ready |
| GPT-4 Turbo | 128K | Fast & Efficient |
-#### Google
+šµ Google Models
+
| Model | Context | Specialty |
|-------|---------|-----------|
| Gemini 2.0 Pro | 1M+ | Massive Context |
| Gemini 2.0 Flash | 1M+ | Ultra Fast |
-#### Qwen
-| Model | Context | Specialty |
-|-------|---------|-----------|
+š Qwen & Local Models
+
+| Model | Context/Size | Specialty |
+|-------|--------------|-----------|
| Qwen 2.5 Coder | 32K | Code Specialized |
| Qwen 2.5 | 32K | General Purpose |
+| DeepSeek Coder (Ollama) | Varies | Code |
+| Llama 3.1 (Ollama) | Varies | General |
-#### Local (Ollama)
-| Model | Size | Specialty |
-|-------|------|-----------|
-| DeepSeek Coder | Varies | Code |
-| Llama 3.1 | Varies | General |
-| CodeLlama | Varies | Code |
-| Mistral | Varies | General |
+šØ Branding & Identity
-#### šØ Branding & Identity
- ā
**New Branding**: "NomadArch" with proper attribution to OpenCode
- ā
**Updated Loading Screen**: New branding with fork attribution
- ā
**Updated Empty States**: All screens show NomadArch branding
-#### š Qwen OAuth Integration
-- ā
**Fixed OAuth Flow**: Resolved "Body cannot be empty" error in Qwen authentication
-- ā
**Proper API Bodies**: POST requests now include proper JSON bodies
-- ā
**Fixed Device Poll Schema**: Corrected Fastify schema validation for OAuth polling
+š Qwen OAuth Integration
+
+- ā
**Fixed OAuth Flow**: Resolved "Body cannot be empty" error
+- ā
**Proper API Bodies**: POST requests now include proper JSON bodies
+- ā
**Fixed Device Poll Schema**: Corrected Fastify schema validation
+
+š MULTIX Mode Enhancements
-#### š MULTIX Mode Enhancements
- ā
**Live Streaming Token Counter**: Visible in header during AI processing
- ā
**Thinking Roller Indicator**: Animated indicator with bouncing dots
- ā
**Token Stats Display**: Shows input/output tokens processed
- ā
**Auto-Scroll**: Intelligent scrolling during streaming
-#### š„ļø UI/UX Improvements
-- ā
**Detailed Button Tooltips**: Hover over any button for detailed explanations
- - AUTHED: Authentication status explanation
- - AI MODEL: Model selection help
- - SMART FIX: AI code analysis feature
- - BUILD: Project compilation
- - APEX: Autonomous mode description
- - SHIELD: Auto-approval mode
- - MULTIX MODE: Multi-task interface
-- ā
**Bulletproof Layout**: Fixed layout issues with Editor/MultiX panels
-- ā
**Overflow Handling**: Long code lines don't break layout
-- ā
**Responsive Panels**: Editor and chat panels properly sized
+š Bug Fixes
-#### š§ Developer Experience
-- ā
**Disabled Auto-Browser Open**: Dev server no longer opens browser automatically
-- ā
**Unified Installers**: One-click installers for Windows, Linux, and macOS
-- ā
**Enhanced Launchers**: Auto-fix capabilities, dependency checking, build verification
-- ā
**Port Conflict Detection**: Warns if default ports are in use
-- ā
**Error Recovery**: Provides actionable error messages with fixes
-
-#### š Bug Fixes
- ā
Fixed Qwen OAuth "empty body" errors
-- ā
Fixed MultiX panel being pushed off screen when Editor is open
-- ā
Fixed top menu/toolbar disappearing when file is selected
-- ā
Fixed layout breaking when scrolling in Editor or Chat
-- ā
Fixed auto-scroll interrupting manual scrolling
-- ā
Fixed sessions not showing on workspace first entry
+- ā
Fixed MultiX panel being pushed off screen
+- ā
Fixed top menu/toolbar disappearing
+- ā
Fixed layout breaking when scrolling
+- ā
Fixed sessions not showing on workspace entry
+
+Common Issues & Solutions
-### "opencode not found" or Workspace Creation Fails
-The installer should automatically install OpenCode CLI. If it fails:
-
-**Option 1 - Manual npm install:**
+**Dependencies not installed?**
```bash
-npm install -g opencode-ai@latest
+# Run the installer for your platform
+Install-Windows.bat # Windows
+./Install-Linux.sh # Linux
+./Install-Mac.sh # macOS
```
-**Option 2 - Manual download:**
-1. Visit: https://github.com/sst/opencode/releases/latest
-2. Download the appropriate ZIP for your platform:
- - Windows: `opencode-windows-x64.zip`
- - Linux x64: `opencode-linux-x64.zip`
- - Linux ARM64: `opencode-linux-arm64.zip`
- - macOS Intel: `opencode-darwin-x64.zip`
- - macOS Apple Silicon: `opencode-darwin-arm64.zip`
-3. Extract and place `opencode` or `opencode.exe` in the `bin/` folder
+**Port conflict?**
+```bash
+# Kill process on port 3000/3001
+taskkill /F /PID
- Forked from CodeNomad by OpenCode + NomadArch is an enhanced fork of CodeNomad
diff --git a/manual_test_guide.md b/manual_test_guide.md new file mode 100644 index 0000000..044bf08 --- /dev/null +++ b/manual_test_guide.md @@ -0,0 +1,76 @@ +# MultiX v2 - Verification & User Guide + +**Date:** 2025-12-25 +**Version:** 2.0.0 (Gold Master) + +--- + +## 1. Feature Verification Guide + +### A. Core Multi-Tasking & Parallel Execution +* **Goal:** Verify you can run multiple agents at once without freezing. +* **Steps:** + 1. Create **Task 1**. Type "Write a long story about space" and hit Launch. + 2. *While Task 1 is streaming*, click the **+** button to create **Task 2**. + 3. Type "Write a python script for fibonacci" in Task 2 and hit Launch. + 4. **Result:** Both tasks should stream simultaneously. Switching tabs should be instant. + +### B. Per-Task Isolation (Agents & Models) +* **Goal:** Verify each task retains its own settings. +* **Steps:** + 1. Go to **Task 1**. Select Agent: **"Software Engineer"** and Model: **"minimax-m2"**. + 2. Go to **Task 2**. Select Agent: **"Writer"** and Model: **"deepseek-chat"**. + 3. Switch back and forth. + 4. **Result:** The selectors should update to reflect the saved state for each task. + +### C. AI Agent Generator (NEW) +* **Goal:** Create a custom agent using AI. +* **Steps:** + 1. Open the **Agent Selector** dropdown. + 2. Click **"⨠AI Agent Generator"**. + 3. Type: *"A rust expert who is sarcastic and funny"*. + 4. Click **"Generate Agent"**. + 5. Review the generated name, description, and system prompt. + 6. Click **"Save & Use Agent"**. + 7. **Result:** The new agent is saved and immediately selected. + +### D. Prompt Enhancer +* **Goal:** strict Opus 4.5 prompt optimization. +* **Steps:** + 1. Type a simple prompt: *"fix bug"*. + 2. Click the **Magic Wand (āØ)** button in the input area. + 3. **Result:** The prompt is expanded into a professional, structured request using the active model. + +### E. Compaction System +* **Goal:** Manage context window usage. +* **Steps:** + 1. In a long chat, look for the **"Compact suggested"** banner at the top of the chat list. + 2. Click **"Compact"** in the banner or the header bar. + 3. **Result:** The session history is summarized, freeing up tokens while keeping context. + +--- + +## 2. Menu & Wiring Check + +| Button | Wired Action | Status | +|--------|--------------|--------| +| **MULTIX Badge** | Visual Indicator | ā Active | +| **SKILLS** | Opens Sidebar (Events) | ā Wired | +| **Active Task** | Shows current task name | ā Wired | +| **Pipeline Tab** | Switches to Dashboard | ā Wired | +| **Task Tabs** | Switch/Close Tasks | ā Wired | +| **Compact Btn** | Triggers Compaction | ā Wired | +| **API Key Btn** | Opens Settings Modal | ā Wired | +| **Agent Select** | Updates Task Session | ā Wired | +| **Model Select** | Updates Task Session | ā Wired | + +--- + +## 3. Technical Status + +* **Build:** Passing (No TypeScript errors). +* **Dev Server:** Running on port 3001. +* **Architecture:** Polling-based (150ms sync) to prevent UI thread blocking. +* **State:** Local signals + Non-reactive store references. + +**Ready for deployment.** diff --git a/package-lock.json b/package-lock.json index d926e8a..9baee2d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9608,6 +9608,15 @@ "node": ">=14.17" } }, + "node_modules/ulid": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/ulid/-/ulid-3.0.2.tgz", + "integrity": "sha512-yu26mwteFYzBAot7KVMqFGCVpsF6g8wXfJzQUHvu1no3+rRRSFcSV2nKeYvNPLD2J4b08jYBDhHUjeH0ygIl9w==", + "license": "MIT", + "bin": { + "ulid": "dist/cli.js" + } + }, "node_modules/undici": { "version": "6.22.0", "resolved": "https://registry.npmjs.org/undici/-/undici-6.22.0.tgz", @@ -10604,6 +10613,7 @@ "fastify": "^4.28.1", "fuzzysort": "^2.0.4", "pino": "^9.4.0", + "ulid": "^3.0.2", "undici": "^6.19.8", "zod": "^3.23.8" }, diff --git a/package.json b/package.json index cd87982..ff0a055 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "codenomad-workspace", - "version": "0.4.0", + "version": "0.5.0", "private": true, "description": "CodeNomad monorepo workspace", "workspaces": { @@ -30,4 +30,4 @@ "optionalDependencies": { "@esbuild/win32-x64": "^0.27.2" } -} +} \ No newline at end of file diff --git a/packages/electron-app/electron/main/main.ts b/packages/electron-app/electron/main/main.ts index d709ddb..b412e3d 100644 --- a/packages/electron-app/electron/main/main.ts +++ b/packages/electron-app/electron/main/main.ts @@ -28,6 +28,16 @@ if (isMac) { app.commandLine.appendSwitch("disable-spell-checking") } +// Windows: Use Edge WebView2 rendering for better performance +if (process.platform === "win32") { + app.commandLine.appendSwitch("enable-features", "WebViewTagWebComponent,WebView2") + app.commandLine.appendSwitch("disable-gpu-sandbox") + app.commandLine.appendSwitch("enable-gpu-rasterization") + app.commandLine.appendSwitch("enable-zero-copy") + app.commandLine.appendSwitch("disable-background-timer-throttling") + app.commandLine.appendSwitch("disable-renderer-backgrounding") +} + function getIconPath() { if (app.isPackaged) { return join(process.resourcesPath, "icon.png") diff --git a/packages/opencode-config/plugin/hello.js b/packages/opencode-config/plugin/hello.js index f37564d..6a6dc9d 100644 --- a/packages/opencode-config/plugin/hello.js +++ b/packages/opencode-config/plugin/hello.js @@ -1,18 +1,8 @@ -import { tool } from "@opencode-ai/plugin/tool" +// NomadArch Plugin Template +// This file is a placeholder. OpenCode plugins are optional. +// To create a plugin, see: https://opencode.ai/docs/plugins -export async function HelloPlugin() { - return { - tool: { - hello: tool({ - description: "Return a friendly greeting", - args: { - name: tool.schema.string().optional().describe("Name to greet"), - }, - async execute(args) { - const target = args.name?.trim() || "CodeNomad" - return `Hello, ${target}!` - }, - }), - }, - } +export async function init() { + // No-op placeholder - customize as needed + return {} } diff --git a/packages/server/package.json b/packages/server/package.json index 1257f82..e909523 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -31,6 +31,7 @@ "fastify": "^4.28.1", "fuzzysort": "^2.0.4", "pino": "^9.4.0", + "ulid": "^3.0.2", "undici": "^6.19.8", "zod": "^3.23.8" }, diff --git a/packages/server/src/integrations/opencode-zen.ts b/packages/server/src/integrations/opencode-zen.ts index 09a9c1c..e229c88 100644 --- a/packages/server/src/integrations/opencode-zen.ts +++ b/packages/server/src/integrations/opencode-zen.ts @@ -42,19 +42,55 @@ export type ZenModel = z.infer+ Model: {currentModel()} | Testing UI responsiveness +
+Forked from OpenCode
+An enhanced fork of CodeNomad
diff --git a/packages/ui/src/components/instance/instance-shell2.tsx b/packages/ui/src/components/instance/instance-shell2.tsx
index 381a275..7281644 100644
--- a/packages/ui/src/components/instance/instance-shell2.tsx
+++ b/packages/ui/src/components/instance/instance-shell2.tsx
@@ -10,6 +10,7 @@ import {
type Accessor,
type Component,
} from "solid-js"
+import toast from "solid-toast"
import type { ToolState } from "@opencode-ai/sdk"
import { Accordion } from "@kobalte/core"
import { ChevronDown } from "lucide-solid"
@@ -36,8 +37,11 @@ import {
sessions,
setActiveSession,
executeCustomCommand,
+ sendMessage,
runShellCommand,
} from "../../stores/sessions"
+import { compactSession } from "../../stores/session-actions";
+import { addTask, setActiveTask } from "../../stores/task-actions"
import { keyboardRegistry, type KeyboardShortcut } from "../../lib/keyboard-registry"
import { messageStoreBus } from "../../stores/message-v2/bus"
import { clearSessionRenderCache } from "../message-block"
@@ -54,14 +58,15 @@ import ModelSelector from "../model-selector"
import ModelStatusSelector from "../model-status-selector"
import CommandPalette from "../command-palette"
import Kbd from "../kbd"
-import MultiTaskChat from "../chat/multi-task-chat"
+// Using rebuilt MultiX v2 with polling architecture (no freeze)
+import MultiTaskChat from "../chat/multix-v2"
import { TodoListView } from "../tool-call/renderers/todo"
import ContextUsagePanel from "../session/context-usage-panel"
import SessionView from "../session/session-view"
import { Sidebar, type FileNode } from "./sidebar"
import { Editor } from "./editor"
import { serverApi } from "../../lib/api-client"
-import { Sparkles, Layout as LayoutIcon, Terminal as TerminalIcon, Search, Loader2, Zap, Shield, Settings } from "lucide-solid"
+import { Sparkles, Layout as LayoutIcon, Terminal as TerminalIcon, Search, Loader2, Zap, Shield, Settings, FileArchive } from "lucide-solid"
import { formatTokenTotal } from "../../lib/formatters"
import { sseManager } from "../../lib/sse-manager"
import { getLogger } from "../../lib/logger"
@@ -159,18 +164,32 @@ const InstanceShell2: Component No preview available yet. Run build to detect a preview URL. No session selected Select a session to view messages Remote handover Use the addresses below to open CodeNomad from another device. Use the addresses below to open NomadArch from another device.Connect to CodeNomad remotely
- Connect to NomadArch remotely
+