8000 Extensive additions have been made by rkarahan80 · Pull Request #691 · stitionai/devika · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Extensive additions have been made #691

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
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
89 changes: 83 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

- [About](#about)
- [Key Features](#key-features)
- [New Features](#new-features)
- [Web Interface Coding Editor](#web-interface-coding-editor)
- [System Architecture](#system-architecture)
- [Getting Started](#getting-started)
- [Requirements](#requirements)
Expand Down Expand Up @@ -48,11 +50,76 @@ https://github.com/stitionai/devika/assets/26198477/cfed6945-d53b-4189-9fbe-6696
- 📂 Project-based organization and management
- 🔌 Extensible architecture for adding new features and integrations

## New Features

### 🔍 Advanced Code Analysis
- **Code Review Agent**: Comprehensive code quality analysis with scoring and recommendations
- **Security Auditor**: Identifies vulnerabilities, security issues, and compliance concerns
- **Performance Optimizer**: Analyzes bottlenecks and suggests optimizations
- **Dependency Manager**: Checks for outdated packages, security vulnerabilities, and license conflicts

### 🛠️ Enhanced Development Tools
- **Test Generator**: Automatically creates unit tests, integration tests, and test suites
- **Documentation Generator**: Creates comprehensive API docs, README files, and user guides
- **Git Integration**: Enhanced version control with commit history and repository management

### 📊 Analysis Dashboard
- **Interactive Analysis Panel**: New UI component for running and viewing analysis results
- **Real-time Results**: Live updates of analysis progress and results
- **Visual Reports**: Color-coded severity levels and priority indicators

### 🎯 Improved Agent Actions
- **Extended Action Set**: New actions for `review`, `test`, `optimize`, `security`, `document`, and `dependencies`
- **Smart Action Detection**: Better understanding of user intent for automated task routing
- **Contextual Responses**: More detailed and actionable feedback from analysis results

### 🔧 Developer Experience
- **Enhanced Error Handling**: Better error messages and recovery mechanisms
- **Improved Logging**: More detailed analysis and operation logs
- **API Endpoints**: RESTful APIs for programmatic access to analysis features

## Web Interface Coding Editor

### 🖥️ Professional Code Editor
- **Monaco Editor Integration**: Full-featured code editor with syntax highlighting for 50+ languages
- **Intelligent Code Completion**: Context-aware suggestions and auto-completion
- **Multi-tab Support**: Work on multiple files simultaneously with tab management
- **File Explorer**: Tree view of project files with context menu operations
- **Real-time Collaboration**: Live editing with conflict resolution

### ⚡ Advanced Editor Features
- **Syntax Highlighting**: Support for JavaScript, TypeScript, Python, HTML, CSS, and more
- **Code Formatting**: Automatic code formatting with Prettier integration
- **Error Detection**: Real-time syntax and semantic error highlighting
- **Find & Replace**: Advanced search with regex support and multi-file search
- **Code Folding**: Collapse and expand code blocks for better navigation
- **Minimap**: Bird's eye view of the entire file for quick navigation

### 🎨 Customizable Interface
- **Theme Support**: Light and dark themes with custom color schemes
- **Font Customization**: Adjustable font size and family preferences
- **Layout Options**: Resizable panels and customizable workspace layout
- **Keyboard Shortcuts**: Extensive keyboard shortcuts for power users
- **Status Bar**: Real-time information about cursor position, file encoding, and language

### 📁 File Management
- **Create/Delete Files**: Easy file and folder creation with context menus
- **Rename Operations**: Inline renaming with validation
- **File Upload**: Drag and drop file upload support
- **Auto-save**: Automatic saving with visual indicators for unsaved changes
- **Version Control**: Git integration with diff viewing and commit history

### 🔧 Developer Tools
- **Integrated Terminal**: Built-in terminal for running commands
- **Debugging Support**: Breakpoints and step-through debugging
- **Extension System**: Plugin architecture for custom functionality
- **Code Snippets**: Predefined code templates and custom snippets
- **Emmet Support**: Fast HTML/CSS coding with Emmet abbreviations

## System Architecture

Read [**README.md**](docs/architecture) for the detailed documentation.


## Getting Started

### Requirements
Expand All @@ -68,7 +135,6 @@ Version's requirements
- For ollama [ollama setup guide](docs/Installation/ollama.md) (optinal: if you don't want to use the local models then you can skip this step)
- For API models, configure the API keys via setting page in UI.


### Installation

To install Devika, follow these steps:
Expand Down Expand Up @@ -123,8 +189,20 @@ To start using Devika, follow these steps:
4. In the chat interface, provide a high-level objective or task description for Devika to work on.
5. Devika will process your request, break it down into steps, and start working on the task.
6. Monitor Devika's progress, view generated code, and provide additional guidance or feedback as needed.
7. Once Devika completes the task, review the generated code and project files.
8. Iterate and refine the project as desired by providing further instructions or modifications.
7. Use the new Analysis Panel to run code reviews, security audits, performance analysis, and dependency checks.
8. Generate tests and documentation using the enhanced tools.
9. **Use the Web Code Editor** to manually edit files, create new files, and manage your project structure.
10. Once Devika completes the task, review the generated code and project files.
11. Iterate and refine the project as desired by providing further instructions or modifications.

### Web Code Editor Usage

1. **Access the Editor**: Click on the "Code Editor" icon in the sidebar to open the web-based code editor.
2. **File Management**: Use the file explorer on the left to navigate, create, delete, and rename files.
3. **Multi-tab Editing**: Open multiple files in tabs for efficient development workflow.
4. **Code Features**: Enjoy syntax highlighting, auto-completion, and error detection.
5. **Save Changes**: Use Ctrl+S to save files or enable auto-save in settings.
6. **Collaboration**: Work alongside Devika's AI-generated code with real-time updates.

## Configuration

Expand All @@ -151,7 +229,6 @@ when you first time run Devika, it will create a `config.toml` file for you in t

Make sure to keep your API keys secure and do not share them publicly. For setting up the Bing and Google search API keys, follow the instructions in the [search engine setup](docs/Installation/search_engine.md)


## Contributing

We welcome contributions to enhance Devika's capabilities and improve its performance. To contribute, please see the [`CONTRIBUTING.md`](CONTRIBUTING.md) file for steps.
Expand Down Expand Up @@ -180,4 +257,4 @@ Devika is released under the [MIT License](https://opensource.org/licenses/MIT).

---

We hope you find Devika to be a valuable tool in your software development journey. If you have any questions, feedback, or suggestions, please don't hesitate to reach out. Happy coding with Devika!
We hope you find Devika to be a valuable tool in your software development journey. If you have any questions, feedback, or suggestions, please don't hesitate to reach out. Happy coding with Devika!
5 changes: 2 additions & 3 deletions devika.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ RUN $HOME/.cargo/bin/uv venv
ENV PATH="/home/nonroot/devika/.venv/bin:$HOME/.cargo/bin:$PATH"

# copy devika python engine only
RUN $HOME/.cargo/bin/uv venv
COPY requirements.txt /home/nonroot/devika/
RUN UV_HTTP_TIMEOUT=100000 $HOME/.cargo/bin/uv pip install -r requirements.txt

Expand All @@ -32,7 +31,7 @@ RUN chown -R nonroot:nonroot /home/nonroot/devika

USER nonroot
WORKDIR /home/nonroot/devika
ENV PATH="/home/nonroot/devika/.venv/bin:$HOME/.cargo/bin:$PATH"
ENV PATH="/usr/bin:/home/nonroot/devika/.venv/bin:$HOME/.cargo/bin:$PATH"
RUN mkdir /home/nonroot/devika/db

ENTRYPOINT [ "python3", "-m", "devika" ]
ENTRYPOINT [ "python3", "-m", "devika" ]
12 changes: 11 additions & 1 deletion devika.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
import tiktoken

from src.apis.project import project_bp
from src.apis.analysis import analysis_bp
from src.apis.file_operations import file_ops_bp
from src.apis.editor import editor_bp
from src.apis.mcp import mcp_bp
from src.config import Config
from src.logger import Logger, route_logger
from src.project import ProjectManager
Expand All @@ -30,8 +34,14 @@
[
"https://localhost:3000",
"http://localhost:3000",
"https://localhost:3001",
"http://localhost:3001",
]}})
app.register_blueprint(project_bp)
app.register_blueprint(analysis_bp)
app.register_blueprint(file_ops_bp)
app.register_blueprint(editor_bp)
app.register_blueprint(mcp_bp)
socketio.init_app(app)


Expand Down Expand Up @@ -206,4 +216,4 @@ def status():

if __name__ == "__main__":
logger.info("Devika is up and running!")
socketio.run(app, debug=False, port=1337, host="0.0.0.0")
socketio.run(app, debug=False, port=1337, host="0.0.0.0")
8 changes: 7 additions & 1 deletion src/agents/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,10 @@
from .formatter import Formatter
from .coder import Coder
from .action import Action
from .runner import Runner
from .runner import Runner
from .code_reviewer import CodeReviewer
from .test_generator import TestGenerator
from .performance_optimizer import PerformanceOptimizer
from .security_auditor import SecurityAuditor
from .documentation_generator import DocumentationGenerator
from .dependency_manager import DependencyManager
6 changes: 6 additions & 0 deletions src/agents/action/prompt.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ The user could be asking the following:
- `feature` - Add a new feature to the project.
- `bug` - Fix a bug in the project.
- `report` - Generate a report on the project.
- `review` - Perform a code review on the project.
- `test` - Generate tests for the project.
- `optimize` - Optimize the project for performance.
- `security` - Perform a security audit on the project.
- `document` - Generate documentation for the project.
- `dependencies` - Analyze and manage project dependencies.

Your response should be in the following format:
```
Expand Down
Loading
0