Skip to content
Merged
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
4 changes: 4 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# OpenAI API Configuration
# Copy this file to .env and replace with your actual API key
# Get your API key from: https://platform.openai.com/api-keys
OPENAI_API_KEY=sk-your_api_key_here
34 changes: 34 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module",
"project": "./tsconfig.json"
},
"plugins": [
"@typescript-eslint"
],

"rules": {
"@typescript-eslint/no-unused-vars": [
"warn",
{
"argsIgnorePattern": "^_"
}
],
"@typescript-eslint/no-explicit-any": "off",
"curly": "warn",
"eqeqeq": "warn",
"no-throw-literal": "warn",
"semi": "warn"
},
"ignorePatterns": [
"out",
"dist",
"node_modules",
"src/test/**/*",
"**/*.d.ts",
"**/*.js"
]
}
141 changes: 141 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
name: Bug Report
description: File a bug report to help us improve CodIn
title: "[Bug]: "
labels: ["bug", "triage"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!

Please search existing issues before creating a new one.

- type: input
id: version
attributes:
label: CodIn Version
description: What version of CodIn are you using?
placeholder: "1.2.3"
validations:
required: true

- type: input
id: vscode-version
attributes:
label: VS Code Version
description: What version of VS Code are you using?
placeholder: "1.84.0"
validations:
required: true

- type: dropdown
id: os
attributes:
label: Operating System
description: What operating system are you using?
options:
- Windows
- macOS
- Linux
- Other
validations:
required: true

- type: textarea
id: description
attributes:
label: Bug Description
description: A clear and concise description of what the bug is.
placeholder: "When I select code and right-click, the 'Explain Code with AI' option doesn't appear..."
validations:
required: true

- type: textarea
id: steps
attributes:
label: Steps to Reproduce
description: Steps to reproduce the behavior
placeholder: |
1. Open VS Code
2. Select some code
3. Right-click
4. See error...
validations:
required: true

- type: textarea
id: expected
attributes:
label: Expected Behavior
description: What did you expect to happen?
placeholder: "The context menu should show 'Explain Code with AI' option..."
validations:
required: true

- type: textarea
id: actual
attributes:
label: Actual Behavior
description: What actually happened?
placeholder: "The context menu doesn't show the option, or shows an error..."
validations:
required: true

- type: textarea
id: console-output
attributes:
label: Console Output
description: Any relevant output from VS Code Developer Console (Help > Toggle Developer Tools)
render: shell
placeholder: "Paste any error messages or console output here..."

- type: textarea
id: extension-logs
attributes:
label: Extension Logs
description: Any relevant logs from the Extension Development Host or Output panel
render: shell
placeholder: "Paste any extension-related logs here..."

- type: dropdown
id: programming-language
attributes:
label: Programming Language
description: What programming language were you working with?
options:
- JavaScript
- TypeScript
- Python
- Java
- C++
- C#
- Go
- Rust
- PHP
- Ruby
- Swift
- Kotlin
- Other
- Not applicable

- type: checkboxes
id: checklist
attributes:
label: Pre-submission Checklist
description: Please confirm the following before submitting
options:
- label: I have searched existing issues for duplicates
required: true
- label: I am using the latest version of CodIn
required: true
- label: "I have tried reloading VS Code window (Cmd/Ctrl+Shift+P > Developer: Reload Window)"
required: true
- label: I have provided all necessary information above
required: true

- type: textarea
id: additional
attributes:
label: Additional Context
description: Add any other context about the problem here
placeholder: "Screenshots, configuration details, related issues, etc..."
119 changes: 119 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
name: Feature Request
description: Suggest an idea for CodIn
title: "[Feature]: "
labels: ["enhancement", "triage"]
body:
- type: markdown
attributes:
value: |
Thanks for suggesting a new feature for CodIn!

Please search existing issues to see if your feature has already been requested.

- type: textarea
id: problem
attributes:
label: Problem Statement
description: Is your feature request related to a problem? Please describe.
placeholder: "I'm always frustrated when..."
validations:
required: true

- type: textarea
id: solution
attributes:
label: Proposed Solution
description: Describe the solution you'd like to see
placeholder: "I would like CodIn to..."
validations:
required: true

- type: textarea
id: alternatives
attributes:
label: Alternatives Considered
description: Describe any alternative solutions or features you've considered
placeholder: "Alternative approaches might include..."

- type: dropdown
id: category
attributes:
label: Feature Category
description: What category does this feature fall into?
options:
- Code Explanation
- Language Support
- User Interface
- API Integration
- Performance
- Security
- Configuration
- Other
validations:
required: true

- type: dropdown
id: priority
attributes:
label: Priority Level
description: How important is this feature to you?
options:
- Low (Nice to have)
- Medium (Would improve workflow)
- High (Essential for my use case)
- Critical (Blocking current functionality)
validations:
required: true

- type: checkboxes
id: implementation
attributes:
label: Implementation Ideas
description: Do you have ideas about how this could be implemented?
options:
- label: I have specific implementation ideas
- label: I am willing to contribute code for this feature
- label: I am willing to help with testing
- label: I am willing to help with documentation

- type: textarea
id: implementation-details
attributes:
label: Implementation Details
description: If you have specific ideas about implementation, please share them
placeholder: "This could be implemented by..."

- type: textarea
id: use-cases
attributes:
label: Use Cases
description: Describe specific use cases where this feature would be helpful
placeholder: |
1. When working on large codebases...
2. When explaining code to team members...
3. When learning new programming concepts...

- type: textarea
id: examples
attributes:
label: Examples
description: Provide examples of how this feature would work
placeholder: "For example, if I select a React component..."

- type: checkboxes
id: related-tools
attributes:
label: Related Tools
description: Are there similar features in other tools that inspired this request?
options:
- label: Similar feature exists in another VS Code extension
- label: Similar feature exists in another IDE or editor
- label: Similar feature exists in other AI tools
- label: This is a completely new idea

- type: textarea
id: additional-context
attributes:
label: Additional Context
description: Add any other context, screenshots, or examples about the feature request
placeholder: "Screenshots, mockups, links to similar features, etc..."
95 changes: 95 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
name: CI/CD

on:
push:
branches: [ main, dev ]
pull_request:
branches: [ main ]

jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x, 18.x, 20.x]

steps:
- uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Lint code
run: npm run lint --if-present

- name: Compile TypeScript
run: npm run compile

- name: Run tests
run: npm test --if-present

package:
runs-on: ubuntu-latest
needs: test

steps:
- uses: actions/checkout@v3

- name: Use Node.js 18
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Install VSCE
run: npm install -g vsce

- name: Compile extension
run: npm run compile

- name: Package extension
run: vsce package --allow-star-activation

- name: Upload VSIX artifact
uses: actions/upload-artifact@v3
with:
name: codin-extension
path: '*.vsix'

publish:
runs-on: ubuntu-latest
needs: [test, package]
if: github.ref == 'refs/heads/main' && github.event_name == 'push'

steps:
- uses: actions/checkout@v3

- name: Use Node.js 18
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Install VSCE
run: npm install -g vsce

- name: Compile extension
run: npm run compile

- name: Publish to VS Code Marketplace
run: vsce publish -p ${{ secrets.VSCE_PAT }}
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
Loading
Loading