Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions extensions/ai-agent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ A minimal built-in extension that contributes an AI activity bar icon and a side
- Commands:
- `AI: Open Chat Sidebar` (`aiAgent.open`) focuses the AI view container
- `AI: Send Message` (`aiAgent.sendMessage`) posts a stubbed echo reply to the chat
- `AI: Select Model` (`aiAgent.selectModel`) opens a picker to select a Grok model variant

Model selection
- The header includes a dropdown to choose a Grok model variant (Grok 2, Grok 2 Mini, Grok 1.5, Grok 1).
- The chosen model is stored in the `aiAgent.grok.model` setting and reflected in stubbed responses, e.g. `Echo (Grok 2 Mini): ...`.

Notes
- The chat is a simple webview view with no networking; responses are stubbed.
Expand Down
19 changes: 19 additions & 0 deletions extensions/ai-agent/media/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,25 @@ body {
filter: brightness(.96);
}

.ai-select {
border: 1px solid var(--ai-border);
background: var(--vscode-dropdown-background);
color: var(--vscode-dropdown-foreground);
padding: .25rem .5rem;
border-radius: .3rem;
cursor: pointer;
}

.ai-select:hover {
border-color: var(--ai-accent);
}

.ai-select:focus {
outline: none;
border-color: var(--ai-accent);
box-shadow: 0 0 0 1px var(--ai-accent) inset;
}

@media (max-width: 750px) {
.ai-main { height: calc(100vh - 3.2rem); }
.ai-tool { padding: .2rem .45rem; }
Expand Down
32 changes: 30 additions & 2 deletions extensions/ai-agent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"onView:aiAgent.chat",
"onCommand:aiAgent.open",
"onCommand:aiAgent.sendMessage",
"onCommand:aiAgent.clear"
"onCommand:aiAgent.clear",
"onCommand:aiAgent.selectModel"
],
"main": "./out/extension",
"capabilities": {
Expand Down Expand Up @@ -54,10 +55,20 @@
"command": "aiAgent.clear",
"title": "AI: Clear Chat",
"category": "AI"
},
{
"command": "aiAgent.selectModel",
"title": "AI: Select Model",
"category": "AI"
}
],
"menus": {
"view/title": [
{
"command": "aiAgent.selectModel",
"when": "view == aiAgent.chat",
"group": "navigation@98"
},
{
"command": "aiAgent.clear",
"when": "view == aiAgent.chat",
Expand All @@ -71,7 +82,24 @@
"contents": "Welcome to AI Chat. Type a message below to start.",
"when": "true"
}
]
],
"configuration": {
"title": "AI Agent",
"properties": {
"aiAgent.grok.model": {
"type": "string",
"default": "grok-2",
"enum": ["grok-2", "grok-2-mini", "grok-1.5", "grok-1"],
"enumDescriptions": [
"Strong general model (stubbed)",
"Fast and lightweight (stubbed)",
"Balanced capability (stubbed)",
"Legacy model (stubbed)"
],
"description": "Grok model to use in the demo chat. Responses are stubbed."
}
}
}
},
"scripts": {
"compile": "npx gulp compile-extension:ai-agent",
Expand Down
Loading