Initial commit: Alfred Commander v1.0.1 - VS Code extension
- AI chat sidebar with multi-provider support - Session management, token tracking, usage stats - Voice input, file attachments, code actions - Integrates with Alfred IDE (code-server) auth system
This commit is contained in:
commit
fd7361e044
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
node_modules/
|
||||||
|
.vscode-test/
|
||||||
|
*.vsix
|
||||||
41
.vsixmanifest
Normal file
41
.vsixmanifest
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
|
||||||
|
<Metadata>
|
||||||
|
<Identity Language="en-US" Id="alfred-commander" Version="1.0.1" Publisher="gositeme" />
|
||||||
|
<DisplayName>Alfred Commander — Full IDE Chat & Voice</DisplayName>
|
||||||
|
<Description xml:space="preserve">Fresh Alfred panel: all agents & models, voice STT/TTS, attachments, hands-free. IDE shortcuts are explicit buttons — chat text always goes to AI.</Description>
|
||||||
|
<Tags>keybindings</Tags>
|
||||||
|
<Categories>Other</Categories>
|
||||||
|
<GalleryFlags>Public</GalleryFlags>
|
||||||
|
|
||||||
|
<Properties>
|
||||||
|
<Property Id="Microsoft.VisualStudio.Code.Engine" Value="^1.70.0" />
|
||||||
|
<Property Id="Microsoft.VisualStudio.Code.ExtensionDependencies" Value="" />
|
||||||
|
<Property Id="Microsoft.VisualStudio.Code.ExtensionPack" Value="" />
|
||||||
|
<Property Id="Microsoft.VisualStudio.Code.ExtensionKind" Value="workspace" />
|
||||||
|
<Property Id="Microsoft.VisualStudio.Code.LocalizedLanguages" Value="" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<Property Id="Microsoft.VisualStudio.Services.GitHubFlavoredMarkdown" Value="true" />
|
||||||
|
<Property Id="Microsoft.VisualStudio.Services.Content.Pricing" Value="Free"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</Properties>
|
||||||
|
|
||||||
|
|
||||||
|
</Metadata>
|
||||||
|
<Installation>
|
||||||
|
<InstallationTarget Id="Microsoft.VisualStudio.Code"/>
|
||||||
|
</Installation>
|
||||||
|
<Dependencies/>
|
||||||
|
<Assets>
|
||||||
|
<Asset Type="Microsoft.VisualStudio.Code.Manifest" Path="extension/package.json" Addressable="true" />
|
||||||
|
<Asset Type="Microsoft.VisualStudio.Services.Content.Details" Path="extension/README.md" Addressable="true" />
|
||||||
|
</Assets>
|
||||||
|
</PackageManifest>
|
||||||
60
README.md
Normal file
60
README.md
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
# Alfred Commander (Theia / code-server extension)
|
||||||
|
|
||||||
|
**Alfred IDE** = GoCodeMe **Theia** in the browser (`/ide/...`), **not** Cursor. Extensions are loaded from **`gocodeme/theia-fork/plugins/`** (see `gocodeme/docs/ALFRED_COMMANDER_THEIA.md`).
|
||||||
|
|
||||||
|
**New panel** — does **not** replace `gositeme.alfred-voice`; you can disable the old one when you’re happy.
|
||||||
|
|
||||||
|
## What’s included (full stack)
|
||||||
|
|
||||||
|
- **All agents & model routes** (same list as Alfred Voice)
|
||||||
|
- **Voice**: mic → Whisper STT → chat; **TTS** playback of replies
|
||||||
|
- **Hands-free**, **attachments** (images, PDF, text, ZIP), **payload meter**, **telemetry log**, **retry**
|
||||||
|
- **IDE shortcuts** as **explicit buttons** (Terminal, Save, Save all, Commands, Split, New file) — **chat text is never hijacked** by “save/search/find” phrases
|
||||||
|
- `run <cmd>` still sends **only** to the integrated terminal (not to AI)
|
||||||
|
- `insert` / `type` prefixes still insert at cursor
|
||||||
|
|
||||||
|
## Proven wiring (kept from working code)
|
||||||
|
|
||||||
|
- `POST /api/alfred-chat.php` with `ide_session_token`, IDE bearer headers, **Set-Cookie array** handling, CSRF retry
|
||||||
|
- `ide_client_id` / `ide_sig` HMAC when profile is available
|
||||||
|
- **Request id** on thinking rows for reply alignment
|
||||||
|
|
||||||
|
## Install (Alfred IDE / Theia — primary)
|
||||||
|
|
||||||
|
Canonical copy:
|
||||||
|
|
||||||
|
`~/.local/share/code-server/extensions/gositeme.alfred-commander-1.0.0/`
|
||||||
|
|
||||||
|
**Theia** (Alfred IDE) loads plugins from:
|
||||||
|
|
||||||
|
`gocodeme/theia-fork/plugins/gositeme.alfred-commander-1.0.0` → symlink to the canonical path above.
|
||||||
|
|
||||||
|
1. Confirm that symlink exists on the server.
|
||||||
|
2. **Restart your IDE session** (stop + launch Theia) so plugins reload.
|
||||||
|
3. **View → Open View…** → **Alfred Commander**.
|
||||||
|
|
||||||
|
Optional: **code-server**-only installs can use the same canonical path under `~/.local/share/code-server/extensions/`.
|
||||||
|
|
||||||
|
4. **Activity bar** — gold mic **Alfred Commander**; or **Command Palette** → **Alfred Commander: Open Panel**.
|
||||||
|
5. Optional: disable `alfred-voice` if you don’t want two Alfred panels.
|
||||||
|
6. To dock on the **right**: drag the view into the **secondary side bar** (View → Appearance → Secondary Side Bar).
|
||||||
|
|
||||||
|
## Commands & keys (no **View** menu required)
|
||||||
|
|
||||||
|
- **Ctrl+Shift+P** (or **F1**) → type **`Alfred Commander: Open Panel`** → Enter.
|
||||||
|
This works even when the top menu bar is hidden.
|
||||||
|
- **Ctrl+Shift+Alt+O** — **Open Panel** (after extension loads / VSIX updated).
|
||||||
|
- **Ctrl+Shift+Alt+A** — **Toggle mic**
|
||||||
|
- **Alfred Commander: Test API Connection** — from Command Palette
|
||||||
|
|
||||||
|
If the menu bar is missing: **Ctrl+Shift+P** → **Preferences: Open Settings** → search **`menu bar`** → set **Menu Bar Visibility** to **Visible** (or **Classic**). The extension also sets a default to show the menu when possible.
|
||||||
|
|
||||||
|
## Commands (palette)
|
||||||
|
|
||||||
|
- `Alfred Commander: Open Panel`
|
||||||
|
- `Alfred Commander: Toggle Mic`
|
||||||
|
- `Alfred Commander: Test API Connection`
|
||||||
|
|
||||||
|
## Token
|
||||||
|
|
||||||
|
Same as before: sign in at `/alfred-ide/`, `session.json` in `logs/alfred-ide/` or `~/.alfred-ide/`, or `ALFRED_IDE_TOKEN` env.
|
||||||
2093
extension.js
Normal file
2093
extension.js
Normal file
File diff suppressed because it is too large
Load Diff
12
extensions.json
Normal file
12
extensions.json
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"recommendations": [
|
||||||
|
"gositeme.alfred-commander"
|
||||||
|
],
|
||||||
|
"unwantedRecommendations": [
|
||||||
|
"ms-vscode-remote.remote-ssh",
|
||||||
|
"ms-vscode.remote-server",
|
||||||
|
"ms-vscode.remote-explorer",
|
||||||
|
"github.copilot",
|
||||||
|
"github.copilot-chat"
|
||||||
|
]
|
||||||
|
}
|
||||||
6
media/alfred-icon.svg
Normal file
6
media/alfred-icon.svg
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="#e2b340" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||||
|
<path d="M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"/>
|
||||||
|
<path d="M19 10v2a7 7 0 0 1-14 0v-2"/>
|
||||||
|
<line x1="12" y1="19" x2="12" y2="23"/>
|
||||||
|
<line x1="8" y1="23" x2="16" y2="23"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 352 B |
17
media/walkthrough/meet-alfred.md
Normal file
17
media/walkthrough/meet-alfred.md
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
# Meet Alfred
|
||||||
|
|
||||||
|
Alfred is your AI coding companion, built into the sidebar.
|
||||||
|
|
||||||
|
## What Alfred Can Do
|
||||||
|
- **Answer questions** about your code, frameworks, and tools
|
||||||
|
- **Generate code** from natural language descriptions
|
||||||
|
- **Debug issues** by analyzing errors and suggesting fixes
|
||||||
|
- **Explain code** — select any block and ask "what does this do?"
|
||||||
|
- **Run tools** — file search, terminal commands, web lookups
|
||||||
|
|
||||||
|
## How to Start
|
||||||
|
1. Click the **Alfred icon** (🅰️) in the activity bar (left side)
|
||||||
|
2. Type your question or request in the chat input
|
||||||
|
3. Press Enter — Alfred responds in real time
|
||||||
|
|
||||||
|
Alfred remembers your conversation context, so you can have natural multi-turn discussions about your code.
|
||||||
18
media/walkthrough/models.md
Normal file
18
media/walkthrough/models.md
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# AI Models
|
||||||
|
|
||||||
|
Alfred IDE supports multiple AI providers and models.
|
||||||
|
|
||||||
|
## Available Tiers
|
||||||
|
|
||||||
|
| Tier | Best For | Examples |
|
||||||
|
|------|----------|---------|
|
||||||
|
| **Leaf** | Simple tasks, quick answers | GPT-4o-mini, local Ollama |
|
||||||
|
| **Mid** | Code generation, analysis | Claude 3.5 Sonnet, GPT-4o |
|
||||||
|
| **Frontier** | Complex reasoning, architecture | Claude Opus, GPT-4 |
|
||||||
|
| **Max** | Research, multi-step planning | Claude Opus (extended) |
|
||||||
|
|
||||||
|
## How to Switch
|
||||||
|
Use the **model dropdown** at the top of the Alfred panel to select your preferred model.
|
||||||
|
|
||||||
|
## Local Models
|
||||||
|
If Ollama is running, local models appear automatically — your code never leaves your machine.
|
||||||
24
media/walkthrough/shortcuts.md
Normal file
24
media/walkthrough/shortcuts.md
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
# Keyboard Shortcuts
|
||||||
|
|
||||||
|
Master these to work at full speed.
|
||||||
|
|
||||||
|
## Alfred Commands
|
||||||
|
| Shortcut | Action |
|
||||||
|
|----------|--------|
|
||||||
|
| `Ctrl+Shift+Alt+O` | Open Alfred Panel |
|
||||||
|
| `Ctrl+Shift+Alt+A` | Toggle Voice Mode |
|
||||||
|
|
||||||
|
## Essential IDE Shortcuts
|
||||||
|
| Shortcut | Action |
|
||||||
|
|----------|--------|
|
||||||
|
| `Ctrl+P` | Quick File Open |
|
||||||
|
| `Ctrl+Shift+P` | Command Palette |
|
||||||
|
| `Ctrl+`` ` | Toggle Terminal |
|
||||||
|
| `Ctrl+B` | Toggle Sidebar |
|
||||||
|
| `Ctrl+Shift+E` | File Explorer |
|
||||||
|
| `Ctrl+Shift+F` | Search Across Files |
|
||||||
|
| `Ctrl+Shift+G` | Source Control |
|
||||||
|
| `F5` | Start Debugging |
|
||||||
|
| `Ctrl+/` | Toggle Line Comment |
|
||||||
|
| `Alt+↑/↓` | Move Line Up/Down |
|
||||||
|
| `Ctrl+D` | Select Next Occurrence |
|
||||||
27
media/walkthrough/sovereign.md
Normal file
27
media/walkthrough/sovereign.md
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
# Sovereign Development
|
||||||
|
|
||||||
|
Alfred IDE is built on one principle: **your code is yours**.
|
||||||
|
|
||||||
|
## What We Don't Do
|
||||||
|
- ❌ No telemetry or usage tracking
|
||||||
|
- ❌ No analytics or behavior profiling
|
||||||
|
- ❌ No data sold to third parties
|
||||||
|
- ❌ No phone-home to Microsoft, Google, or anyone
|
||||||
|
- ❌ No extension marketplace surveillance
|
||||||
|
|
||||||
|
## What We Do
|
||||||
|
- ✅ All AI calls go through your GoSiteMe account
|
||||||
|
- ✅ Conversations are stored in YOUR database
|
||||||
|
- ✅ Local Ollama models keep everything on-device
|
||||||
|
- ✅ Secret redaction engine scrubs credentials from all output
|
||||||
|
- ✅ Post-quantum encryption available via Veil Protocol
|
||||||
|
|
||||||
|
## The GoSiteMe Ecosystem
|
||||||
|
Alfred IDE is one pillar of the sovereign computing stack:
|
||||||
|
- **Alfred Linux** — AI-native operating system
|
||||||
|
- **Alfred Browser** — zero-tracking web browser
|
||||||
|
- **Alfred Mobile** — sovereign smartphone OS
|
||||||
|
- **Veil** — post-quantum encrypted messaging
|
||||||
|
- **MetaDome** — VR worlds with 51M+ AI agents
|
||||||
|
|
||||||
|
Welcome to the kingdom. 🏰
|
||||||
16
media/walkthrough/stats.md
Normal file
16
media/walkthrough/stats.md
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
# Account & Usage
|
||||||
|
|
||||||
|
Monitor your plan, usage, and billing from inside the IDE.
|
||||||
|
|
||||||
|
## How to Access
|
||||||
|
Click your **username** in the bottom status bar, or run:
|
||||||
|
- Command Palette → "Alfred: Account & Usage Stats"
|
||||||
|
|
||||||
|
## What You'll See
|
||||||
|
- **Plan**: Your current subscription tier
|
||||||
|
- **Token Usage**: How many AI tokens you've consumed
|
||||||
|
- **Credit Balance**: Remaining credits for the billing period
|
||||||
|
- **Active Services**: Which ecosystem services are linked
|
||||||
|
|
||||||
|
## Commander Access
|
||||||
|
If you're the Commander (client_id 33), you have unlimited access — no token limits, no restrictions.
|
||||||
18
media/walkthrough/voice.md
Normal file
18
media/walkthrough/voice.md
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# Voice Commands
|
||||||
|
|
||||||
|
Talk to your IDE — Alfred listens, transcribes, and responds.
|
||||||
|
|
||||||
|
## How It Works
|
||||||
|
1. Click the **🎤 microphone** button in the Alfred panel
|
||||||
|
2. Speak naturally — your voice is transcribed in real time
|
||||||
|
3. Alfred processes your request and responds
|
||||||
|
|
||||||
|
## Voice Architecture
|
||||||
|
- **STT (Speech-to-Text)**: Whisper-based transcription
|
||||||
|
- **LLM**: Your selected AI model processes the request
|
||||||
|
- **TTS (Text-to-Speech)**: Kokoro voices read the response back
|
||||||
|
|
||||||
|
## Tips
|
||||||
|
- Speak clearly and at a normal pace
|
||||||
|
- You can say "stop" or click the mic again to end recording
|
||||||
|
- Voice works best with short, focused requests
|
||||||
137
package.json
Normal file
137
package.json
Normal file
@ -0,0 +1,137 @@
|
|||||||
|
{
|
||||||
|
"name": "alfred-commander",
|
||||||
|
"displayName": "Alfred IDE Assistant — Full IDE Chat & Voice",
|
||||||
|
"description": "Fresh Alfred panel: all agents & models, voice STT/TTS, attachments, hands-free. IDE shortcuts are explicit buttons — chat text always goes to AI.",
|
||||||
|
"version": "1.0.1",
|
||||||
|
"publisher": "gositeme",
|
||||||
|
"engines": {
|
||||||
|
"vscode": "^1.70.0"
|
||||||
|
},
|
||||||
|
"categories": [
|
||||||
|
"Other"
|
||||||
|
],
|
||||||
|
"activationEvents": [
|
||||||
|
"onStartupFinished"
|
||||||
|
],
|
||||||
|
"main": "./extension.js",
|
||||||
|
"contributes": {
|
||||||
|
"configurationDefaults": {
|
||||||
|
"window.menuBarVisibility": "visible"
|
||||||
|
},
|
||||||
|
"commands": [
|
||||||
|
{
|
||||||
|
"command": "alfred-commander.open",
|
||||||
|
"title": "Alfred: Open Panel"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "alfred-commander.toggle",
|
||||||
|
"title": "Alfred: Toggle Mic"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "alfred-commander.showStats",
|
||||||
|
"title": "Alfred: Account & Usage Stats"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "alfred-commander.welcome",
|
||||||
|
"title": "Alfred: Getting Started"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "alfred-commander.workspaceStatus",
|
||||||
|
"title": "Alfred: Workspace Status"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"keybindings": [
|
||||||
|
{
|
||||||
|
"command": "alfred-commander.open",
|
||||||
|
"key": "ctrl+shift+alt+o",
|
||||||
|
"mac": "cmd+shift+alt+o"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "alfred-commander.toggle",
|
||||||
|
"key": "ctrl+shift+alt+a",
|
||||||
|
"mac": "cmd+shift+alt+a"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"viewsContainers": {
|
||||||
|
"activitybar": [
|
||||||
|
{
|
||||||
|
"id": "alfred-commander-container",
|
||||||
|
"title": "Alfred",
|
||||||
|
"icon": "media/alfred-icon.svg"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"views": {
|
||||||
|
"alfred-commander-container": [
|
||||||
|
{
|
||||||
|
"type": "webview",
|
||||||
|
"id": "alfred-commander.panel",
|
||||||
|
"name": "Alfred",
|
||||||
|
"visibility": "visible"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"walkthroughs": [
|
||||||
|
{
|
||||||
|
"id": "alfred-ide-getting-started",
|
||||||
|
"title": "Getting Started with Alfred IDE",
|
||||||
|
"description": "Your sovereign development environment — AI-powered, zero-tracking, fully yours.",
|
||||||
|
"steps": [
|
||||||
|
{
|
||||||
|
"id": "meet-alfred",
|
||||||
|
"title": "Meet Alfred — Your AI Companion",
|
||||||
|
"description": "Alfred lives in the sidebar. Click the Alfred icon in the activity bar to open the chat panel. Ask anything — code questions, file operations, debugging help.\n\n[Open Alfred Panel](command:alfred-commander.open)",
|
||||||
|
"media": {
|
||||||
|
"markdown": "media/walkthrough/meet-alfred.md"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "voice-commands",
|
||||||
|
"title": "Talk to Your IDE",
|
||||||
|
"description": "Alfred supports voice input. Click the microphone button or press ``Ctrl+Shift+Alt+A`` to toggle voice mode. Speak naturally — Alfred transcribes and responds.\n\n[Toggle Voice](command:alfred-commander.toggle)",
|
||||||
|
"media": {
|
||||||
|
"markdown": "media/walkthrough/voice.md"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "choose-model",
|
||||||
|
"title": "Choose Your AI Model",
|
||||||
|
"description": "Switch between AI providers and models using the dropdown at the top of the Alfred panel. Available models include Claude, GPT, local Ollama models, and more.",
|
||||||
|
"media": {
|
||||||
|
"markdown": "media/walkthrough/models.md"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "account-stats",
|
||||||
|
"title": "Check Your Usage & Plan",
|
||||||
|
"description": "Click your username in the status bar (bottom-left) to see your account details, token usage, plan info, and billing.\n\n[View Account Stats](command:alfred-commander.showStats)",
|
||||||
|
"media": {
|
||||||
|
"markdown": "media/walkthrough/stats.md"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "keyboard-shortcuts",
|
||||||
|
"title": "Essential Shortcuts",
|
||||||
|
"description": "Master these shortcuts to work faster:\n- ``Ctrl+Shift+Alt+O`` — Open Alfred Panel\n- ``Ctrl+Shift+Alt+A`` — Toggle Voice\n- ``Ctrl+``` `` — Open Terminal\n- ``Ctrl+P`` — Quick File Open\n- ``Ctrl+Shift+P`` — Command Palette",
|
||||||
|
"media": {
|
||||||
|
"markdown": "media/walkthrough/shortcuts.md"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "sovereign-ide",
|
||||||
|
"title": "Your Sovereign IDE",
|
||||||
|
"description": "Alfred IDE tracks nothing. No telemetry, no usage analytics, no data collection. Your code stays on your machine. Your conversations stay private. Welcome to sovereign development.",
|
||||||
|
"media": {
|
||||||
|
"markdown": "media/walkthrough/sovereign.md"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"__metadata": {
|
||||||
|
"installedTimestamp": 1774281381634,
|
||||||
|
"targetPlatform": "undefined",
|
||||||
|
"size": 75665
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user