Skip to content

Commit

Permalink
feat: add webview
Browse files Browse the repository at this point in the history
  • Loading branch information
2214962083 committed Aug 12, 2024
1 parent bd9c58a commit 32d8d65
Show file tree
Hide file tree
Showing 74 changed files with 1,975 additions and 444 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ deployspec.yml
cz-adapter.cjs
LICENSE
*.vue
*.html
12 changes: 7 additions & 5 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json.schemastore.org/eslintrc",
"extends": ["airbnb-base", "prettier"],
"extends": ["airbnb", "prettier"],
"plugins": ["json", "prettier"],
"env": {
"es2020": true
Expand Down Expand Up @@ -35,13 +35,13 @@
},
"overrides": [
{
"files": ["**/*.ts", "**/*.mts"],
"files": ["**/*.ts", "**/*.mts", "**/*.tsx"],
"parser": "@typescript-eslint/parser",
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"airbnb-base",
"airbnb-typescript/base",
"airbnb",
"airbnb-typescript",
"prettier"
],
"parserOptions": {
Expand Down Expand Up @@ -92,7 +92,9 @@
"@typescript-eslint/naming-convention": "off",
"no-alert": "off",
"@typescript-eslint/ban-types": "off",
"import/no-extraneous-dependencies": "off"
"import/no-extraneous-dependencies": "off",
"react/jsx-no-bind": "off",
"react/react-in-jsx-scope": "off"
}
}
]
Expand Down
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
"pyproject",
"qwen",
"tailwindcss",
"tomjs",
"treeshake",
"tsup",
"undici",
Expand Down
13 changes: 13 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Aide</title>
</head>

<body>
<div id="app"></div>
<script type="module" src="./src/webview/main.tsx"></script>
</body>
</html>
67 changes: 47 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"Formatters",
"Education"
],
"main": "./dist/node/index.js",
"main": "./dist/extension/index.js",
"icon": "res/icon.png",
"engines": {
"vscode": "^1.82.0"
Expand All @@ -66,6 +66,24 @@
"onStartupFinished"
],
"contributes": {
"viewsContainers": {
"activitybar": [
{
"id": "aide",
"title": "Aide",
"icon": "res/icon-mask.png"
}
]
},
"views": {
"aide": [
{
"type": "webview",
"id": "aide.webview",
"name": "Aide"
}
]
},
"commands": [
{
"command": "aide.copyAsPrompt",
Expand Down Expand Up @@ -271,45 +289,51 @@
"scripts": {
"copyFiles": "fse copy ./package.nls.en.json ./package.nls.json",
"dev": "code --extensionDevelopmentPath=$PWD --disable-extensions &&pnpm run watch",
"build": "tsc --noEmit &&pnpm run copyFiles &&tsup",
"build:minify": "pnpm run build --minify",
"build:pack": "pnpm run build:minify &&vsce package -o dist/aide.vsix --no-dependencies",
"dev:ui": "vite serve dev",
"build": "tsc &&pnpm run copyFiles &&vite build",
"build:pack": "pnpm run build &&vsce package -o dist/aide.vsix --no-dependencies",
"commit": "git add . && cz",
"knip": "knip",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"publish": "esno ./scripts/publish.ts",
"prepare": "husky",
"test": "tsc --noEmit &&vitest --run",
"watch": "pnpm run build --watch --sourcemap"
"watch": "vite"
},
"devDependencies": {
"@atao60/fse-cli": "^0.1.9",
"@commitlint/cli": "^19.3.0",
"@commitlint/cli": "^19.4.0",
"@commitlint/config-conventional": "^19.2.2",
"@commitlint/cz-commitlint": "^19.2.0",
"@commitlint/cz-commitlint": "^19.4.0",
"@ianvs/prettier-plugin-sort-imports": "^4.3.1",
"@langchain/anthropic": "^0.2.12",
"@langchain/core": "0.2.20",
"@langchain/openai": "^0.2.5",
"@langchain/anthropic": "^0.2.14",
"@langchain/core": "0.2.23",
"@langchain/openai": "^0.2.6",
"@tomjs/vite-plugin-vscode": "^2.5.5",
"@types/fs-extra": "^11.0.4",
"@types/global-agent": "^2.1.3",
"@types/node": "^22.1.0",
"@types/node": "^22.2.0",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@types/shell-quote": "^1.7.5",
"@types/vscode": "1.82.0",
"@types/vscode-webview": "^1.57.5",
"@typescript-eslint/eslint-plugin": "^7.17.0",
"@typescript-eslint/parser": "^7.17.0",
"@vitejs/plugin-react-swc": "^3.7.0",
"@vscode/vsce": "^2.31.1",
"@vscode/webview-ui-toolkit": "^1.4.0",
"commitizen": "^4.3.0",
"dotenv": "^16.4.5",
"eslint": "^8.57.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-typescript": "^18.0.0",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-json": "^4.0.0",
"eslint-plugin-json": "^4.0.1",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-simple-import-sort": "^12.1.1",
"eslint-plugin-unused-imports": "^3.2.0",
Expand All @@ -320,28 +344,31 @@
"glob": "^10.4.3",
"global-agent": "^3.0.0",
"husky": "^9.1.4",
"ignore": "^5.3.1",
"ignore": "^5.3.2",
"inquirer": "^9.3.4",
"knip": "^5.27.0",
"langchain": "^0.2.12",
"knip": "^5.27.2",
"langchain": "^0.2.15",
"lint-staged": "^15.2.8",
"minimatch": "^9.0.5",
"node-fetch": "^3.3.2",
"p-limit": "^6.1.0",
"pnpm": "^9.6.0",
"pnpm": "^9.7.0",
"prettier": "^3.3.3",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"rimraf": "^6.0.1",
"shell-quote": "^1.8.1",
"tsup": "^8.2.4",
"typescript": "5.4.5",
"undici": "^6.19.5",
"vite": "^5.3.5",
"undici": "^6.19.7",
"vite": "^5.4.0",
"vite-tsconfig-paths": "^5.0.1",
"vitest": "^2.0.5",
"zod": "^3.23.8"
},
"pnpm": {
"overrides": {
"@langchain/core": "0.2.20"
"@langchain/core": "0.2.23"
}
},
"commitlint": {
Expand Down
Loading

0 comments on commit 32d8d65

Please sign in to comment.