├── .gitignore ├── Dockerfile ├── LICENSE ├── README.md ├── assets ├── FPT_Software_Logo.png ├── developer_workflow.png ├── hyperagent-logo-zip-file.zip ├── hyperagent-logo-zip-file │ ├── pdf │ │ ├── logo-black.pdf │ │ ├── logo-color.pdf │ │ ├── logo-no-background.pdf │ │ └── logo-white.pdf │ ├── png │ │ ├── logo-black.png │ │ ├── logo-color.png │ │ ├── logo-no-background.png │ │ └── logo-white.png │ └── svg │ │ ├── logo-black.svg │ │ ├── logo-color.svg │ │ ├── logo-no-background.svg │ │ └── logo-white.svg ├── logo_app.svg ├── method_overview.png └── swe-bench.png ├── hyperagent-ext ├── .DS_Store ├── .eslintrc.json ├── .gitignore ├── .vscode │ ├── extensions.json │ ├── launch.json │ ├── settings.json │ └── tasks.json ├── .vscodeignore ├── .yarnrc ├── CHANGELOG.md ├── README.md ├── media │ ├── main.css │ ├── main.js │ └── scripts │ │ ├── highlight.min.css │ │ ├── highlight.min.js │ │ ├── jsr.woff2 │ │ ├── marked.min.js │ │ ├── microlight.min.js │ │ ├── showdown.min.js │ │ └── tailwind.min.js ├── package-lock.json ├── package.json ├── resources │ ├── extensionIcon.png │ ├── icon.png │ └── imagez.png ├── src │ ├── extension.ts │ └── panels │ │ └── HelloWorldPanel.ts ├── tsconfig.json ├── vsc-extension-quickstart.md ├── webpack.config.js └── yarn.lock ├── main.py ├── paper └── main.pdf ├── pyproject.toml ├── requirements.txt ├── scripts ├── convert_swe.py ├── data_generation.py ├── data_getsql.py ├── ds_config_zero3.json ├── fine_tuning.py ├── llama3_instruct_nav.yaml ├── merge_model.py ├── run_defects4j_apr.py ├── run_defects4j_fl.py ├── run_swe_bench.py ├── unslot_training.py └── upload.py ├── setup.py ├── src └── hyperagent │ ├── __init__.py │ ├── agents │ ├── llms.py │ └── plan_seeking.py │ ├── build.py │ ├── cli │ ├── __init__.py │ ├── cli.py │ └── console.py │ ├── code_search.py │ ├── constants.py │ ├── get_repo_struct.py │ ├── langchain_parsers │ ├── language │ │ ├── csharp.py │ │ ├── java.py │ │ ├── python.py │ │ ├── rust.py │ │ └── tree_sitter_segmenter.py │ └── parsers.py │ ├── llm_multilspy.py │ ├── multilspy │ ├── __init__.py │ ├── language_server.py │ ├── language_servers │ │ ├── eclipse_jdtls │ │ │ ├── eclipse_jdtls.py │ │ │ ├── initialize_params.json │ │ │ └── runtime_dependencies.json │ │ ├── jedi_language_server │ │ │ ├── initialize_params.json │ │ │ └── jedi_server.py │ │ ├── omnisharp │ │ │ ├── initialize_params.json │ │ │ ├── omnisharp.py │ │ │ ├── runtime_dependencies.json │ │ │ └── workspace_did_change_configuration.json │ │ └── rust_analyzer │ │ │ ├── initialize_params.json │ │ │ ├── runtime_dependencies.json │ │ │ └── rust_analyzer.py │ ├── lsp_protocol_handler │ │ ├── lsp_constants.py │ │ ├── lsp_requests.py │ │ ├── lsp_types.py │ │ └── server.py │ ├── multilspy_config.py │ ├── multilspy_exceptions.py │ ├── multilspy_logger.py │ ├── multilspy_settings.py │ ├── multilspy_types.py │ ├── multilspy_utils.py │ └── type_helpers.py │ ├── pilot.py │ ├── prompts │ ├── __init__.py │ ├── editor.py │ ├── executor.py │ ├── navigator.py │ ├── planner.py │ └── utils.py │ ├── tasks │ ├── automated_program_repair.py │ ├── base.py │ ├── fault_localization.py │ ├── github_issue_resolve.py │ └── utils │ │ ├── bl │ │ ├── defects4j.sh │ │ ├── name_utils.py │ │ └── sequence_utils.py │ │ └── google-java-format-1.12.0-all-deps.jar │ ├── tools │ ├── gen_tools.py │ ├── nav_tools.py │ ├── tools.py │ └── tree-sitter │ │ └── python.so │ ├── utils.py │ └── zoekt │ └── zoekt_server.py └── tests ├── test_lsptoolkit.py ├── test_zoek.py └── tools └── python └── go_to_def.py /.gitignore: -------------------------------------------------------------------------------- 1 | data/repos/* 2 | data/indexes/* 3 | hyperagent.egg-info 4 | */__pycache__/* 5 | **/*.pyc 6 | **/__pycache__/* 7 | **/__pycache__/ 8 | src/hyperagent/multilspy/language_servers/rust_analyzer/static 9 | src/hyperagent/multilspy/language_servers/eclipse_jdtls/static 10 | src/hyperagent/tree-sitter 11 | evaluation_benchmark/bug_reproduction/defects4j/* 12 | evaluation_benchmark/bug_reproduction/Defects4J/gen_tests/* 13 | evaluation_benchmark/bug_reproduction/Defects4J/repos/* 14 | evaluation_benchmark/SWE_bench/data/* 15 | .zoekt_tmp/ 16 | dist/* 17 | wandb/ 18 | model/ 19 | data/ 20 | data/repos/* 21 | data/agent_trajectories/* 22 | .vscode/* 23 | swe_bench.zip 24 | .aider* 25 | .cache/* 26 | .history/* 27 | logs/* 28 | outputs/* 29 | .cache/* 30 | build/* -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | # Uses multi-staged approach to reduce size 2 | # Stage 1 3 | # Use base conda image to reduce time 4 | FROM continuumio/miniconda3:latest AS compile-image 5 | # Specify py version 6 | ENV PYTHON_VERSION=3.10 7 | 8 | RUN apt-get update && \ 9 | apt-get install -y curl git wget software-properties-common git-lfs && \ 10 | apt-get clean && \ 11 | rm -rf /var/lib/apt/lists* 12 | 13 | # Install Go 14 | RUN wget https://dl.google.com/go/go1.21.3.linux-amd64.tar.gz 15 | RUN tar -xvf go1.21.3.linux-amd64.tar.gz 16 | RUN mv go /usr/local 17 | 18 | ENV GOROOT=/usr/local/go 19 | ENV GOPATH=$HOME/go 20 | ENV PATH=$GOPATH/bin:$GOROOT/bin:$PATH 21 | 22 | # Install Zoekt 23 | RUN go install github.com/sourcegraph/zoekt/cmd/zoekt-index@latest 24 | RUN go install github.com/sourcegraph/zoekt/cmd/zoekt-webserver@latest 25 | 26 | # Install universal-ctags for semantic code search 27 | RUN apt-get update && \ 28 | apt-get install -y autoconf pkg-config gcc libjansson-dev make && \ 29 | git clone https://github.com/universal-ctags/ctags.git && \ 30 | cd ctags && \ 31 | ./autogen.sh && \ 32 | ./configure --program-prefix=universal- --enable-json && \ 33 | make && \ 34 | make install 35 | 36 | ENV CTAGS_COMMAND=universal-ctags 37 | 38 | # Create our conda env - copied from https://github.com/huggingface/accelerate/blob/main/docker/accelerate-gpu/Dockerfile 39 | RUN conda create --name hyperagent python=${PYTHON_VERSION} ipython jupyter pip 40 | RUN python3 -m pip install --no-cache-dir --upgrade pip 41 | 42 | # Below is copied from https://github.com/huggingface/accelerate/blob/main/docker/accelerate-gpu/Dockerfile 43 | # We don't install pytorch here yet since CUDA isn't available 44 | # instead we use the direct torch wheel 45 | ENV PATH /opt/conda/envs/hyperagent/bin:$PATH 46 | # Activate our bash shell 47 | RUN chsh -s /bin/bash 48 | SHELL ["/bin/bash", "-c"] 49 | 50 | # Stage 2 51 | FROM nvidia/cuda:12.2.2-devel-ubuntu22.04 AS build-image 52 | COPY --from=compile-image /opt/conda /opt/conda 53 | ENV PATH /opt/conda/bin:$PATH 54 | 55 | RUN chsh -s /bin/bash 56 | COPY requirements.txt . 57 | SHELL ["/bin/bash", "-c"] 58 | RUN source activate hyperagent && \ 59 | python3 -m pip install --no-cache-dir -r requirements.txt 60 | 61 | COPY . /hyperagent 62 | WORKDIR /hyperagent 63 | 64 | RUN source activate hyperagent && \ 65 | python3 -m pip install --no-cache-dir -e . 66 | 67 | # Activate the virtualenv 68 | CMD ["/bin/bash"] -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 |
6 |
7 |
42 |
43 |
44 |
45 |
46 | 47 | ## Installation and Usage 48 | HyperAgent uses Zoekt for code search. Please install Zoekt before installing HyperAgent. Zoekt requires latest Go installation, please follow the instructions [here](https://www.linuxedo.com/2021/10/install-latest-golang-on-linux.html) to install Go. 49 | 50 | ```bash 51 | go get github.com/sourcegraph/zoekt/ 52 | 53 | # Install Zoekt Index 54 | go install github.com/sourcegraph/zoekt/cmd/zoekt-index 55 | # Install Zoekt Web Server 56 | go install github.com/sourcegraph/zoekt/cmd/zoekt-webserver 57 | ``` 58 | We also need to install universal-ctags for semantic code search. Please follow the instructions [here](https://github.com/sourcegraph/sourcegraph/blob/main/doc/dev/how-to/zoekt_local_dev.md#install-ctags). Remember to set the environment variable of CTAGS `CTAGS_COMMAND=universal-ctags`. 59 | 60 | After installing Zoekt and universal-ctags, we can install HyperAgent by running the following commands, notes that it's a must to create a new conda environment before installing HyperAgent named hyperagent, since the Executor uses jupyter kernel named hyperagent to execute the code: 61 | ```bash 62 | conda create -n hyperagent python=3.10 63 | pip3 install -e . 64 | ``` 65 | 66 | ### Quick Test 67 | To test the hyperagent with general prompt, you can run the following command: 68 | ```bash 69 | python3 main.py --repo "your/path/to/repo" --commit "commit_hash" --language "python" --clone_dir "data/repos" --prompt "I want to create an FastAPI app to handle GET request from OpenAI API" 70 | ``` 71 | ### General usage 72 | ```python 73 | from hyperagent import HyperAgent 74 | pilot = HyperAgent(repo, commit=commit, language=language, clone_dir="data/repos") 75 | ``` 76 | with `repo` is the repository URL, `commit` is the commit hash, `language` is the programming language of the repository, and `clone_dir` is the directory to store the cloned repository. You also can configure the agents by setting the `config` parameter. 77 | 78 | Hyperagent supports 2 modes: patch and predict. In the patch mode, the agent will generate a patch for the given task. In the predict mode, the agent will predict the next token for the given task (for example, repoQA or fault location). 79 | 80 | ```python 81 | config = { 82 | "name": "claude", 83 | "nav": [{ 84 | "model": "claude-3-haiku-20240307", 85 | "api_key": os.environ.get("ANTHROPIC_API_KEY"), 86 | "stop_sequences": ["\nObservation:"], 87 | "base_url": "https://api.anthropic.com", 88 | "api_type": "anthropic", 89 | }], 90 | "edit": [{ 91 | "model": "claude-3-5-sonnet-20240620", 92 | "api_key": os.environ.get("ANTHROPIC_API_KEY"), 93 | "stop_sequences": ["\nObservation:"], 94 | "price": [0.003, 0.015], 95 | "base_url": "https://api.anthropic.com", 96 | "api_type": "anthropic", 97 | }], 98 | "exec": [{ 99 | "model": "claude-3-5-sonnet-20240620", 100 | "api_type": os.environ.get("ANTHROPIC_API_KEY"), 101 | "stop_sequences": ["\nObservation:"], 102 | "price": [0.003, 0.015], 103 | "base_url": "https://api.anthropic.com", 104 | "api_type": "anthropic", 105 | }], 106 | "plan": [{ 107 | "model": "claude-3-5-sonnet-20240620", 108 | "api_type": os.environ.get("ANTHROPIC_API_KEY"), 109 | "price": [0.003, 0.015], 110 | "base_url": "https://api.anthropic.com", 111 | "api_type": "anthropic", 112 | }], 113 | "type": "patch" 114 | } 115 | ``` 116 | 117 | HyperAgent is a software generalist agent, therefore it can be used to solve various software engineering tasks. We provide a few examples of how to use HyperAgent to solve different tasks in the `scripts` folder. This is easily configured via an input template prompt for each task. 118 | 119 | For example, in `src/hyperagent/tasks/github_issue_resolution.py`, we provide a script to resolve GitHub issues using HyperAgent. The script will prompt the user to input the issue title and description, and then HyperAgent will generate a patch to resolve the issue. 120 | ```python 121 | def run(self, system, idx) -> Result: 122 | prompt = self.construct_prompt(idx) 123 | system.query_codebase(prompt) 124 | prediction_patch = extract_patch(system.repo_dir) 125 | return prediction_patch 126 | ``` 127 | 128 | If you want to use HyperAgent to solve other tasks and systematically evaluate the results, you can create a new task class and implement the `run` method. The `run` method should return the result of the task. 129 | 130 | ## Reproduce Evaluation Results 131 | To reproduce the results, please follow the instructions in the `scripts` folder. We provide the scripts to reproduce the results on SWE-Bench, RepoExec, and Defects4J datasets. 132 | 133 | ### SWE-Bench 134 | ```bash 135 | python3 scripts/run_swe_bench.py --split "test" 136 | ``` 137 | 138 | ### Fault Localization 139 | ```bash 140 | python3 scripts/run_defects4j_fl.py 141 | ``` 142 | 143 | ### Program Repair 144 | ```bash 145 | python3 scripts/run_defects4j_apr.py 146 | ``` 147 | 148 | ### 149 | 150 | # Citing HyperAgent 151 | 152 | If you're using HyperAgent in your research or applications, please cite using this BibTeX: 153 | ```bibtex 154 | @article{huy2024hyperagent, 155 | title={HyperAgent: Generalist Software Engineering Agents to Solve Coding Tasks at Scale}, 156 | author={Phan, Huy Nhat and Nguyen, Phong X and Bui, Nghi DQ}, 157 | journal={arXiv preprint arXiv:2406.11912}, 158 | year={2024} 159 | } 160 | ``` 161 | 162 | # Contact us 163 | If you have any questions, comments or suggestions, please do not hesitate to contact us. 164 | - Website: [fpt-aicenter](https://www.fpt-aicenter.com/ai-residency/) 165 | - Email: bdqnghi@gmail.com 166 | 167 | # License 168 | [MIT License](LICENSE) 169 | -------------------------------------------------------------------------------- /assets/FPT_Software_Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSoft-AI4Code/HyperAgent/c3092f2601ab3bf7f890fac2cd5b1290d3f59256/assets/FPT_Software_Logo.png -------------------------------------------------------------------------------- /assets/developer_workflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSoft-AI4Code/HyperAgent/c3092f2601ab3bf7f890fac2cd5b1290d3f59256/assets/developer_workflow.png -------------------------------------------------------------------------------- /assets/hyperagent-logo-zip-file.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSoft-AI4Code/HyperAgent/c3092f2601ab3bf7f890fac2cd5b1290d3f59256/assets/hyperagent-logo-zip-file.zip -------------------------------------------------------------------------------- /assets/hyperagent-logo-zip-file/pdf/logo-black.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSoft-AI4Code/HyperAgent/c3092f2601ab3bf7f890fac2cd5b1290d3f59256/assets/hyperagent-logo-zip-file/pdf/logo-black.pdf -------------------------------------------------------------------------------- /assets/hyperagent-logo-zip-file/pdf/logo-color.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSoft-AI4Code/HyperAgent/c3092f2601ab3bf7f890fac2cd5b1290d3f59256/assets/hyperagent-logo-zip-file/pdf/logo-color.pdf -------------------------------------------------------------------------------- /assets/hyperagent-logo-zip-file/pdf/logo-no-background.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSoft-AI4Code/HyperAgent/c3092f2601ab3bf7f890fac2cd5b1290d3f59256/assets/hyperagent-logo-zip-file/pdf/logo-no-background.pdf -------------------------------------------------------------------------------- /assets/hyperagent-logo-zip-file/pdf/logo-white.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSoft-AI4Code/HyperAgent/c3092f2601ab3bf7f890fac2cd5b1290d3f59256/assets/hyperagent-logo-zip-file/pdf/logo-white.pdf -------------------------------------------------------------------------------- /assets/hyperagent-logo-zip-file/png/logo-black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSoft-AI4Code/HyperAgent/c3092f2601ab3bf7f890fac2cd5b1290d3f59256/assets/hyperagent-logo-zip-file/png/logo-black.png -------------------------------------------------------------------------------- /assets/hyperagent-logo-zip-file/png/logo-color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSoft-AI4Code/HyperAgent/c3092f2601ab3bf7f890fac2cd5b1290d3f59256/assets/hyperagent-logo-zip-file/png/logo-color.png -------------------------------------------------------------------------------- /assets/hyperagent-logo-zip-file/png/logo-no-background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSoft-AI4Code/HyperAgent/c3092f2601ab3bf7f890fac2cd5b1290d3f59256/assets/hyperagent-logo-zip-file/png/logo-no-background.png -------------------------------------------------------------------------------- /assets/hyperagent-logo-zip-file/png/logo-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSoft-AI4Code/HyperAgent/c3092f2601ab3bf7f890fac2cd5b1290d3f59256/assets/hyperagent-logo-zip-file/png/logo-white.png -------------------------------------------------------------------------------- /assets/method_overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSoft-AI4Code/HyperAgent/c3092f2601ab3bf7f890fac2cd5b1290d3f59256/assets/method_overview.png -------------------------------------------------------------------------------- /assets/swe-bench.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSoft-AI4Code/HyperAgent/c3092f2601ab3bf7f890fac2cd5b1290d3f59256/assets/swe-bench.png -------------------------------------------------------------------------------- /hyperagent-ext/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSoft-AI4Code/HyperAgent/c3092f2601ab3bf7f890fac2cd5b1290d3f59256/hyperagent-ext/.DS_Store -------------------------------------------------------------------------------- /hyperagent-ext/.eslintrc.json: -------------------------------------------------------------------------------- 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": "warn", 13 | "@typescript-eslint/semi": "warn", 14 | "curly": "warn", 15 | "eqeqeq": "warn", 16 | "no-throw-literal": "warn", 17 | "semi": "off" 18 | }, 19 | "ignorePatterns": [ 20 | "out", 21 | "dist", 22 | "**/*.d.ts" 23 | ] 24 | } 25 | -------------------------------------------------------------------------------- /hyperagent-ext/.gitignore: -------------------------------------------------------------------------------- 1 | out 2 | dist 3 | node_modules 4 | .vscode-test/ 5 | *.vsix 6 | .history/ -------------------------------------------------------------------------------- /hyperagent-ext/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | // See http://go.microsoft.com/fwlink/?LinkId=827846 3 | // for the documentation about the extensions.json format 4 | "recommendations": ["dbaeumer.vscode-eslint", "amodio.tsl-problem-matcher"] 5 | } 6 | -------------------------------------------------------------------------------- /hyperagent-ext/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | // A launch configuration that compiles the extension and then opens it inside a new window 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | { 6 | "version": "0.2.0", 7 | "configurations": [ 8 | { 9 | "name": "Run Extension", 10 | "type": "extensionHost", 11 | "request": "launch", 12 | "args": [ 13 | "--extensionDevelopmentPath=${workspaceFolder}" 14 | ], 15 | "outFiles": [ 16 | "${workspaceFolder}/dist/**/*.js" 17 | ], 18 | "preLaunchTask": "${defaultBuildTask}" 19 | }, 20 | { 21 | "name": "Extension Tests", 22 | "type": "extensionHost", 23 | "request": "launch", 24 | "args": [ 25 | "--extensionDevelopmentPath=${workspaceFolder}", 26 | "--extensionTestsPath=${workspaceFolder}/out/test/suite/index" 27 | ], 28 | "outFiles": [ 29 | "${workspaceFolder}/out/**/*.js", 30 | "${workspaceFolder}/dist/**/*.js" 31 | ], 32 | "preLaunchTask": "tasks: watch-tests" 33 | } 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /hyperagent-ext/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | // Place your settings in this file to overwrite default and user settings. 2 | { 3 | "files.exclude": { 4 | "out": false, // set this to true to hide the "out" folder with the compiled JS files 5 | "dist": false // set this to true to hide the "dist" folder with the compiled JS files 6 | }, 7 | "search.exclude": { 8 | "out": true, // set this to false to include "out" folder in search results 9 | "dist": true // set this to false to include "dist" folder in search results 10 | }, 11 | // Turn off tsc task auto detection since we have the necessary tasks as npm scripts 12 | "typescript.tsc.autoDetect": "off" 13 | } -------------------------------------------------------------------------------- /hyperagent-ext/.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | // See https://go.microsoft.com/fwlink/?LinkId=733558 2 | // for the documentation about the tasks.json format 3 | { 4 | "version": "2.0.0", 5 | "tasks": [ 6 | { 7 | "type": "npm", 8 | "script": "watch", 9 | "problemMatcher": "$ts-webpack-watch", 10 | "isBackground": true, 11 | "presentation": { 12 | "reveal": "never", 13 | "group": "watchers" 14 | }, 15 | "group": { 16 | "kind": "build", 17 | "isDefault": true 18 | } 19 | }, 20 | { 21 | "type": "npm", 22 | "script": "watch-tests", 23 | "problemMatcher": "$tsc-watch", 24 | "isBackground": true, 25 | "presentation": { 26 | "reveal": "never", 27 | "group": "watchers" 28 | }, 29 | "group": "build" 30 | }, 31 | { 32 | "label": "tasks: watch-tests", 33 | "dependsOn": [ 34 | "npm: watch", 35 | "npm: watch-tests" 36 | ], 37 | "problemMatcher": [] 38 | } 39 | ] 40 | } 41 | -------------------------------------------------------------------------------- /hyperagent-ext/.vscodeignore: -------------------------------------------------------------------------------- 1 | .vscode/** 2 | .vscode-test/** 3 | out/** 4 | node_modules/** 5 | src/** 6 | .gitignore 7 | .yarnrc 8 | webpack.config.js 9 | vsc-extension-quickstart.md 10 | **/tsconfig.json 11 | **/.eslintrc.json 12 | **/*.map 13 | **/*.ts 14 | -------------------------------------------------------------------------------- /hyperagent-ext/.yarnrc: -------------------------------------------------------------------------------- 1 | --ignore-engines true -------------------------------------------------------------------------------- /hyperagent-ext/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | 3 | All notable changes to the "chatgpt" extension will be documented in this file. 4 | 5 | Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file. 6 | 7 | ## [Unreleased] 8 | 9 | - Initial release -------------------------------------------------------------------------------- /hyperagent-ext/README.md: -------------------------------------------------------------------------------- 1 | # HyperAgent VScode IDE Extension 2 | -------------------------------------------------------------------------------- /hyperagent-ext/media/main.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: transparent; 3 | } 4 | 5 | .color-list { 6 | list-style: none; 7 | padding: 0; 8 | } 9 | 10 | .color-entry { 11 | width: 100%; 12 | display: flex; 13 | margin-bottom: 0.4em; 14 | border: 1px solid var(--vscode-input-border); 15 | } 16 | 17 | .color-preview { 18 | width: 2em; 19 | height: 2em; 20 | } 21 | 22 | .color-preview:hover { 23 | outline: inset white; 24 | } 25 | 26 | .color-input { 27 | display: block; 28 | flex: 1; 29 | width: 100%; 30 | color: var(--vscode-input-foreground); 31 | background-color: var(--vscode-input-background); 32 | border: none; 33 | padding: 0 0.6em; 34 | } 35 | 36 | .add-color-button { 37 | display: block; 38 | border: none; 39 | margin: 0 auto; 40 | } -------------------------------------------------------------------------------- /hyperagent-ext/media/scripts/highlight.min.css: -------------------------------------------------------------------------------- 1 | /** 2 | * @author Ali Gençay 3 | * https://github.com/gencay/vscode-chatgpt 4 | * 5 | * @license 6 | * Copyright (c) 2022 - Present, Ali Gençay 7 | * 8 | * All rights reserved. Code licensed under the ISC license 9 | * 10 | * The above copyright notice and this permission notice shall be included in all 11 | * copies or substantial portions of the Software. 12 | */ 13 | 14 | .hljs-comment, .hljs-quote {color: #5c6370;font-style: italic }.hljs-doctag, .hljs-formula, .hljs-keyword {color: #c678dd }.hljs-deletion, .hljs-name, .hljs-section, .hljs-selector-tag, .hljs-subst {color: #e06c75 }.hljs-literal {color: #56b6c2 }.hljs-addition, .hljs-attribute, .hljs-meta .hljs-string, .hljs-regexp, .hljs-string {color: #98c379 }.hljs-attr, .hljs-number, .hljs-selector-attr, .hljs-selector-class, .hljs-selector-pseudo, .hljs-template-variable, .hljs-type, .hljs-variable {color: #d19a66 }.hljs-bullet, .hljs-link, .hljs-meta, .hljs-selector-id, .hljs-symbol, .hljs-title {color: #61aeee }.hljs-built_in, .hljs-class .hljs-title, .hljs-title.class_ {color: #e6c07b }.hljs-emphasis {font-style: italic }.hljs-strong {font-weight: 700 }.hljs-link {text-decoration: underline } -------------------------------------------------------------------------------- /hyperagent-ext/media/scripts/jsr.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FSoft-AI4Code/HyperAgent/c3092f2601ab3bf7f890fac2cd5b1290d3f59256/hyperagent-ext/media/scripts/jsr.woff2 -------------------------------------------------------------------------------- /hyperagent-ext/media/scripts/microlight.min.js: -------------------------------------------------------------------------------- 1 | !function(e,t){"function"==typeof define&&define.amd?define(["exports"],t):t("undefined"!=typeof exports?exports:e.microlight={})}(this,function(e){var t,n,i,o=window,r=document,a="appendChild",l="test",c=";text-shadow:",s="opacity:.",d=" 0px 0px ",u="3px 0px 5",f=")",p=function(e){for(n=r.getElementsByClassName(e||"microlight"),t=0;i=n[t++];)for(var p,h,g,m,y,x=i.textContent,b=0,w=x[0],v=1,k=i.innerHTML="",C=0,N=/(\d*\, \d*\, \d*)(, ([.\d]*))?/g.exec(o.getComputedStyle(i).color),E="px rgba("+N[1]+",",S=N[3]||1;h=p,p=7>C&&"\\"==p?1:v;){if(v=w,w=x[++b],m=k.length>1,!v||C>8&&"\n"==v||[/\S/[l](v),1,1,!/[$\w]/[l](v),("/"==p||"\n"==p)&&m,'"'==p&&m,"'"==p&&m,x[b-4]+h+p=="-->",h+p=="*/"][C])for(k&&(i[a](y=r.createElement("span")).setAttribute("style",["",c+d+9+E+.7*S+"),"+d+2+E+.4*S+f,s+6+c+d+7+E+S/4+"),"+d+3+E+S/4+f,s+7+c+u+E+S/5+"),-"+u+E+S/5+f,"font-style:italic;"+s+5+c+u+E+S/4+"),-"+u+E+S/4+f][C?3>C?2:C>6?4:C>3?3:+/^(a(bstract|lias|nd|rguments|rray|s(m|sert)?|uto)|b(ase|egin|ool(ean)?|reak|yte)|c(ase|atch|har|hecked|lass|lone|ompl|onst|ontinue)|de(bugger|cimal|clare|f(ault|er)?|init|l(egate|ete)?)|do|double|e(cho|ls?if|lse(if)?|nd|nsure|num|vent|x(cept|ec|p(licit|ort)|te(nds|nsion|rn)))|f(allthrough|alse|inal(ly)?|ixed|loat|or(each)?|riend|rom|unc(tion)?)|global|goto|guard|i(f|mp(lements|licit|ort)|n(it|clude(_once)?|line|out|stanceof|t(erface|ernal)?)?|s)|l(ambda|et|ock|ong)|m(icrolight|odule|utable)|NaN|n(amespace|ative|ext|ew|il|ot|ull)|o(bject|perator|r|ut|verride)|p(ackage|arams|rivate|rotected|rotocol|ublic)|r(aise|e(adonly|do|f|gister|peat|quire(_once)?|scue|strict|try|turn))|s(byte|ealed|elf|hort|igned|izeof|tatic|tring|truct|ubscript|uper|ynchronized|witch)|t(emplate|hen|his|hrows?|ransient|rue|ry|ype(alias|def|id|name|of))|u(n(checked|def(ined)?|ion|less|signed|til)|se|sing)|v(ar|irtual|oid|olatile)|w(char_t|hen|here|hile|ith)|xor|yield)$/[l](k):0]),y[a](r.createTextNode(k))),g=C&&7>C?C:g,k="",C=11;![1,/[\/{}[(\-+*=<>:;|\\.,?!&@~]/[l](v),/[\])]/[l](v),/[$\w]/[l](v),"/"==v&&2>g&&"<"!=p,'"'==v,"'"==v,v+w+x[b+1]+x[b+2]=="