Skip to content

Commit 31ca637

Browse files
Initial VSCode extension implementation for Codegen
- Created complete VSCode extension structure with TypeScript - Implemented authentication manager with secure token storage - Added API client for Codegen REST API integration - Created tree data provider for agent runs with status indicators - Added commands for login, logout, create agent, and refresh - Configured sidebar view with activity bar integration - Added auto-refresh functionality and configuration options - Included development setup with launch configs and ESLint - Comprehensive README with usage instructions Features: - View recent agent runs in dedicated sidebar - Create new agents with custom prompts - Real-time status updates with color-coded indicators - Click to open agent runs in browser - Secure authentication with organization support - Auto-refresh every 30 seconds (configurable) Co-authored-by: Jay Hack <[email protected]>
0 parents  commit 31ca637

File tree

9 files changed

+786
-0
lines changed

9 files changed

+786
-0
lines changed

.eslintrc.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"root": true,
3+
"parser": "@typescript-eslint/parser",
4+
"parserOptions": {
5+
"ecmaVersion": 6,
6+
"sourceType": "module"
7+
},
8+
"plugins": [
9+
"@typescript-eslint"
10+
],
11+
"rules": {
12+
"@typescript-eslint/naming-convention": [
13+
"warn",
14+
{
15+
"selector": "import",
16+
"format": ["camelCase", "PascalCase"]
17+
}
18+
],
19+
"@typescript-eslint/semi": "warn",
20+
"curly": "warn",
21+
"eqeqeq": "warn",
22+
"no-throw-literal": "warn",
23+
"semi": "off"
24+
},
25+
"ignorePatterns": [
26+
"out",
27+
"dist",
28+
"**/*.d.ts"
29+
]
30+
}

.gitignore

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
out
2+
node_modules
3+
.vscode-test/
4+
*.vsix
5+
.DS_Store
6+
.vscode/settings.json
7+
.vscode/launch.json
8+
.vscode/tasks.json
9+
npm-debug.log*
10+
yarn-debug.log*
11+
yarn-error.log*
12+
lerna-debug.log*
13+
.npm
14+
.eslintcache
15+
.nyc_output
16+
coverage/
17+
*.tgz
18+
*.tar.gz
19+
.cache/
20+
.parcel-cache/
21+
.env
22+
.env.local
23+
.env.development.local
24+
.env.test.local
25+
.env.production.local

README.md

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
# Codegen IDE - VSCode Extension
2+
3+
A VSCode extension for [Codegen](https://codegen.com) that allows you to create and manage async code agents directly from your editor.
4+
5+
## Features
6+
7+
🤖 **Agent Management**
8+
- View your recent agent runs in a dedicated sidebar
9+
- Create new agents with custom prompts
10+
- Monitor agent status with real-time updates
11+
- Open agent runs in your browser
12+
13+
🔐 **Authentication**
14+
- Secure token-based authentication
15+
- Organization support
16+
- Easy login/logout commands
17+
18+
**Real-time Updates**
19+
- Auto-refresh agent runs every 30 seconds
20+
- Manual refresh capability
21+
- Status indicators with color coding
22+
23+
## Installation
24+
25+
1. Install the extension from the VSCode Marketplace (coming soon)
26+
2. Open the Command Palette (`Ctrl+Shift+P` / `Cmd+Shift+P`)
27+
3. Run `Codegen: Login` to authenticate with your Codegen account
28+
4. Start creating and managing agents!
29+
30+
## Usage
31+
32+
### Authentication
33+
34+
1. **Login**: Use `Codegen: Login` command or click the login button in the welcome view
35+
2. **Logout**: Use `Codegen: Logout` command when needed
36+
37+
### Creating Agents
38+
39+
1. Click the "+" button in the Codegen sidebar
40+
2. Enter your agent prompt (e.g., "Fix the bug in the login component")
41+
3. The agent will be created and you can monitor its progress
42+
43+
### Viewing Agent Runs
44+
45+
- All your recent agent runs appear in the Codegen sidebar
46+
- Click on any agent run to open it in your browser
47+
- Status indicators show the current state:
48+
- 🟢 Complete
49+
- 🔵 Running (animated)
50+
- 🔴 Failed
51+
- 🟡 Pending
52+
53+
## Configuration
54+
55+
You can customize the extension behavior in VSCode settings:
56+
57+
```json
58+
{
59+
"codegen.apiEndpoint": "https://api.codegen.com",
60+
"codegen.autoRefresh": true,
61+
"codegen.refreshInterval": 30
62+
}
63+
```
64+
65+
## Commands
66+
67+
- `Codegen: Login` - Authenticate with Codegen
68+
- `Codegen: Logout` - Sign out from Codegen
69+
- `Codegen: Show Agent Runs` - Open the Codegen sidebar
70+
- `Codegen: Create New Agent` - Create a new agent with a prompt
71+
- `Codegen: Refresh Agent Runs` - Manually refresh the agent list
72+
73+
## Requirements
74+
75+
- VSCode 1.74.0 or higher
76+
- A Codegen account ([sign up at codegen.com](https://codegen.com))
77+
- API token from your Codegen dashboard
78+
79+
## Development
80+
81+
### Building from Source
82+
83+
```bash
84+
# Clone the repository
85+
git clone https://github.com/codegen-sh/codegen-ide.git
86+
cd codegen-ide
87+
88+
# Install dependencies
89+
npm install
90+
91+
# Compile TypeScript
92+
npm run compile
93+
94+
# Run in development mode
95+
npm run watch
96+
```
97+
98+
### Testing
99+
100+
```bash
101+
npm test
102+
```
103+
104+
## Contributing
105+
106+
We welcome contributions! Please see our [contributing guidelines](CONTRIBUTING.md) for details.
107+
108+
## License
109+
110+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
111+
112+
## Support
113+
114+
- 📖 [Documentation](https://docs.codegen.com)
115+
- 💬 [Discord Community](https://discord.gg/codegen)
116+
- 🐛 [Report Issues](https://github.com/codegen-sh/codegen-ide/issues)
117+
- 📧 [Email Support](mailto:[email protected])
118+
119+
---
120+
121+
Made with ❤️ by the [Codegen](https://codegen.com) team

package.json

Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
{
2+
"name": "codegen-ide",
3+
"displayName": "Codegen IDE",
4+
"description": "VSCode Extension for Codegen - Create and manage async code agents",
5+
"version": "0.1.0",
6+
"publisher": "codegen-sh",
7+
"engines": {
8+
"vscode": "^1.74.0"
9+
},
10+
"categories": [
11+
"Other"
12+
],
13+
"keywords": [
14+
"codegen",
15+
"ai",
16+
"agent",
17+
"code generation",
18+
"automation"
19+
],
20+
"activationEvents": [
21+
"onStartupFinished"
22+
],
23+
"main": "./out/extension.js",
24+
"contributes": {
25+
"commands": [
26+
{
27+
"command": "codegen.showAgentRuns",
28+
"title": "Show Agent Runs",
29+
"category": "Codegen"
30+
},
31+
{
32+
"command": "codegen.createAgent",
33+
"title": "Create New Agent",
34+
"category": "Codegen"
35+
},
36+
{
37+
"command": "codegen.refreshAgentRuns",
38+
"title": "Refresh Agent Runs",
39+
"category": "Codegen"
40+
},
41+
{
42+
"command": "codegen.login",
43+
"title": "Login",
44+
"category": "Codegen"
45+
},
46+
{
47+
"command": "codegen.logout",
48+
"title": "Logout",
49+
"category": "Codegen"
50+
},
51+
{
52+
"command": "codegen.openAgentRun",
53+
"title": "Open Agent Run",
54+
"category": "Codegen"
55+
}
56+
],
57+
"views": {
58+
"explorer": [
59+
{
60+
"id": "codegenAgentRuns",
61+
"name": "Codegen Agent Runs",
62+
"when": "codegen.authenticated"
63+
}
64+
]
65+
},
66+
"viewsContainers": {
67+
"activitybar": [
68+
{
69+
"id": "codegen",
70+
"title": "Codegen",
71+
"icon": "$(robot)"
72+
}
73+
]
74+
},
75+
"views": {
76+
"codegen": [
77+
{
78+
"id": "codegenAgentRuns",
79+
"name": "Recent Agent Runs",
80+
"when": "codegen.authenticated"
81+
},
82+
{
83+
"id": "codegenWelcome",
84+
"name": "Welcome",
85+
"when": "!codegen.authenticated"
86+
}
87+
]
88+
},
89+
"viewsWelcome": [
90+
{
91+
"view": "codegenWelcome",
92+
"contents": "Welcome to Codegen! 🤖\n\nTo get started, you need to authenticate with your Codegen account.\n\n[Login to Codegen](command:codegen.login)\n\nOnce logged in, you'll be able to:\n• View your recent agent runs\n• Create new agents\n• Manage your code automation\n\nVisit [codegen.com](https://codegen.com) to learn more."
93+
}
94+
],
95+
"menus": {
96+
"view/title": [
97+
{
98+
"command": "codegen.refreshAgentRuns",
99+
"when": "view == codegenAgentRuns",
100+
"group": "navigation"
101+
},
102+
{
103+
"command": "codegen.createAgent",
104+
"when": "view == codegenAgentRuns",
105+
"group": "navigation"
106+
}
107+
],
108+
"view/item/context": [
109+
{
110+
"command": "codegen.openAgentRun",
111+
"when": "view == codegenAgentRuns && viewItem == agentRun"
112+
}
113+
]
114+
},
115+
"configuration": {
116+
"title": "Codegen",
117+
"properties": {
118+
"codegen.apiEndpoint": {
119+
"type": "string",
120+
"default": "https://api.codegen.com",
121+
"description": "Codegen API endpoint"
122+
},
123+
"codegen.autoRefresh": {
124+
"type": "boolean",
125+
"default": true,
126+
"description": "Automatically refresh agent runs"
127+
},
128+
"codegen.refreshInterval": {
129+
"type": "number",
130+
"default": 30,
131+
"description": "Auto-refresh interval in seconds"
132+
}
133+
}
134+
}
135+
},
136+
"scripts": {
137+
"vscode:prepublish": "npm run compile",
138+
"compile": "tsc -p ./",
139+
"watch": "tsc -watch -p ./",
140+
"pretest": "npm run compile && npm run lint",
141+
"lint": "eslint src --ext ts",
142+
"test": "node ./out/test/runTest.js"
143+
},
144+
"devDependencies": {
145+
"@types/vscode": "^1.74.0",
146+
"@types/node": "16.x",
147+
"@typescript-eslint/eslint-plugin": "^5.45.0",
148+
"@typescript-eslint/parser": "^5.45.0",
149+
"eslint": "^8.28.0",
150+
"typescript": "^4.9.4"
151+
},
152+
"dependencies": {
153+
"axios": "^1.6.0"
154+
}
155+
}

0 commit comments

Comments
 (0)