From 01e53ed1fbeeec97249d3a30327dca58b77f8ccc Mon Sep 17 00:00:00 2001 From: Xiao Ning Date: Fri, 3 Jan 2025 12:26:24 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20chore(config):=20=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E9=A1=B9=E7=9B=AE=E9=85=8D=E7=BD=AE=E5=92=8C=E4=BE=9D?= =?UTF-8?q?=E8=B5=96=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 更新项目配置文件结构和编译选项 - 移除 SVN SCM 扩展依赖 - 优化 TypeScript 配置,添加路径别名和跳过类型检查 - 修复 React 组件导入路径 -【配置优化】添加 node_modules 和 dist 到 exclude 列表 -【依赖调整】调整 Git 和 SVN SCM 扩展的依赖关系 -【文档更新】补充 Git SCM 安装说明和 SVN SCM 下载链接 --- README.md | 2 ++ package.json | 1 - src/webview-ui/src/App.tsx | 2 +- src/webview-ui/src/main.tsx | 2 +- src/webview-ui/tsconfig.app.json | 3 ++- src/webview-ui/tsconfig.app.tsbuildinfo | 2 +- src/webview-ui/tsconfig.json | 3 ++- src/webview-ui/tsconfig.node.json | 3 ++- tsconfig.json | 10 ++++++++-- 9 files changed, 19 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 3a29ff6..522cac4 100644 --- a/README.md +++ b/README.md @@ -205,6 +205,8 @@ Weekly report generation supports custom templates: - VS Code 1.80.0+ - [SVN Command Line Tool](http://subversion.apache.org/packages.html) - SVN SCM (Optional) - Install [SVN SCM v2.18.1+](https://github.com/littleCareless/svn-scm/releases/tag/v2.18.1) if you need to enter commit messages in VSCode's SCM input box + - Download the latest version of the SVN SCM extension from the [release page](https://marketplace.visualstudio.com/items?itemName=littleCareless.svn-scm-ai) +- Git SCM (Optional) - Install [Git SCM](https://marketplace.visualstudio.com/items?itemName=vscode.git) if you need to enter commit messages in VSCode's SCM input box - Valid AI service configuration (OpenAI API Key or Ollama service) ### Configuration diff --git a/package.json b/package.json index 1ca2d7a..c3ac03b 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,6 @@ "Gemini" ], "extensionDependencies": [ - "johnstoncode.svn-scm", "vscode.git" ], "main": "./out/extension.js", diff --git a/src/webview-ui/src/App.tsx b/src/webview-ui/src/App.tsx index 7d4a875..922a036 100644 --- a/src/webview-ui/src/App.tsx +++ b/src/webview-ui/src/App.tsx @@ -9,7 +9,7 @@ import { Save, FileDown, Wand2 } from "lucide-react"; import { useToast } from "@/hooks/use-toast"; // import { getMessageType } from "@/constants"; // import "vscode-webview"; -import { vscode } from "@/lib/vscode.ts"; +import { vscode } from "@/lib/vscode"; function App() { const [content, setContent] = useState(""); diff --git a/src/webview-ui/src/main.tsx b/src/webview-ui/src/main.tsx index ea9e363..a46835a 100644 --- a/src/webview-ui/src/main.tsx +++ b/src/webview-ui/src/main.tsx @@ -1,6 +1,6 @@ import { StrictMode } from 'react'; import { createRoot } from 'react-dom/client'; -import App from './App.tsx'; +import App from './App'; import './index.css'; createRoot(document.getElementById('root')!).render( diff --git a/src/webview-ui/tsconfig.app.json b/src/webview-ui/tsconfig.app.json index 66c85c5..b303ada 100644 --- a/src/webview-ui/tsconfig.app.json +++ b/src/webview-ui/tsconfig.app.json @@ -26,5 +26,6 @@ "@/*": ["./src/*"] } }, - "include": ["src"] + "include": ["src"], + "exclude": ["node_modules", "dist"] } diff --git a/src/webview-ui/tsconfig.app.tsbuildinfo b/src/webview-ui/tsconfig.app.tsbuildinfo index c83eff8..19556da 100644 --- a/src/webview-ui/tsconfig.app.tsbuildinfo +++ b/src/webview-ui/tsconfig.app.tsbuildinfo @@ -1 +1 @@ -{"root":["./src/app.tsx","./src/constants.ts","./src/main.tsx","./src/vite-env.d.ts","./src/components/daterangeselector.tsx","./src/components/editor.tsx","./src/components/ui/accordion.tsx","./src/components/ui/alert-dialog.tsx","./src/components/ui/alert.tsx","./src/components/ui/aspect-ratio.tsx","./src/components/ui/avatar.tsx","./src/components/ui/badge.tsx","./src/components/ui/breadcrumb.tsx","./src/components/ui/button.tsx","./src/components/ui/calendar.tsx","./src/components/ui/card.tsx","./src/components/ui/carousel.tsx","./src/components/ui/chart.tsx","./src/components/ui/checkbox.tsx","./src/components/ui/collapsible.tsx","./src/components/ui/command.tsx","./src/components/ui/context-menu.tsx","./src/components/ui/dialog.tsx","./src/components/ui/drawer.tsx","./src/components/ui/dropdown-menu.tsx","./src/components/ui/form.tsx","./src/components/ui/hover-card.tsx","./src/components/ui/input-otp.tsx","./src/components/ui/input.tsx","./src/components/ui/label.tsx","./src/components/ui/menubar.tsx","./src/components/ui/navigation-menu.tsx","./src/components/ui/pagination.tsx","./src/components/ui/popover.tsx","./src/components/ui/progress.tsx","./src/components/ui/radio-group.tsx","./src/components/ui/resizable.tsx","./src/components/ui/scroll-area.tsx","./src/components/ui/select.tsx","./src/components/ui/separator.tsx","./src/components/ui/sheet.tsx","./src/components/ui/skeleton.tsx","./src/components/ui/slider.tsx","./src/components/ui/sonner.tsx","./src/components/ui/switch.tsx","./src/components/ui/table.tsx","./src/components/ui/tabs.tsx","./src/components/ui/textarea.tsx","./src/components/ui/toast.tsx","./src/components/ui/toaster.tsx","./src/components/ui/toggle-group.tsx","./src/components/ui/toggle.tsx","./src/components/ui/tooltip.tsx","./src/contexts/extensioncontext.tsx","./src/hooks/use-toast.ts","./src/lib/constants.ts","./src/lib/utils.ts","./src/lib/vscode.ts","./src/types/vscode.d.ts"],"version":"5.7.2"} \ No newline at end of file +{"root":["./src/App.tsx","./src/constants.ts","./src/main.tsx","./src/vite-env.d.ts","./src/components/DateRangeSelector.tsx","./src/components/Editor.tsx","./src/components/ui/accordion.tsx","./src/components/ui/alert-dialog.tsx","./src/components/ui/alert.tsx","./src/components/ui/aspect-ratio.tsx","./src/components/ui/avatar.tsx","./src/components/ui/badge.tsx","./src/components/ui/breadcrumb.tsx","./src/components/ui/button.tsx","./src/components/ui/calendar.tsx","./src/components/ui/card.tsx","./src/components/ui/carousel.tsx","./src/components/ui/chart.tsx","./src/components/ui/checkbox.tsx","./src/components/ui/collapsible.tsx","./src/components/ui/command.tsx","./src/components/ui/context-menu.tsx","./src/components/ui/dialog.tsx","./src/components/ui/drawer.tsx","./src/components/ui/dropdown-menu.tsx","./src/components/ui/form.tsx","./src/components/ui/hover-card.tsx","./src/components/ui/input-otp.tsx","./src/components/ui/input.tsx","./src/components/ui/label.tsx","./src/components/ui/menubar.tsx","./src/components/ui/navigation-menu.tsx","./src/components/ui/pagination.tsx","./src/components/ui/popover.tsx","./src/components/ui/progress.tsx","./src/components/ui/radio-group.tsx","./src/components/ui/resizable.tsx","./src/components/ui/scroll-area.tsx","./src/components/ui/select.tsx","./src/components/ui/separator.tsx","./src/components/ui/sheet.tsx","./src/components/ui/skeleton.tsx","./src/components/ui/slider.tsx","./src/components/ui/sonner.tsx","./src/components/ui/switch.tsx","./src/components/ui/table.tsx","./src/components/ui/tabs.tsx","./src/components/ui/textarea.tsx","./src/components/ui/toast.tsx","./src/components/ui/toaster.tsx","./src/components/ui/toggle-group.tsx","./src/components/ui/toggle.tsx","./src/components/ui/tooltip.tsx","./src/contexts/ExtensionContext.tsx","./src/hooks/use-toast.ts","./src/lib/constants.ts","./src/lib/utils.ts","./src/lib/vscode.ts","./src/types/vscode.d.ts"],"version":"5.7.2"} \ No newline at end of file diff --git a/src/webview-ui/tsconfig.json b/src/webview-ui/tsconfig.json index dc2480e..6d2eada 100644 --- a/src/webview-ui/tsconfig.json +++ b/src/webview-ui/tsconfig.json @@ -10,5 +10,6 @@ "@/*": ["./src/*"] }, "jsx": "react" - } + }, + "exclude": ["node_modules", "dist"] } diff --git a/src/webview-ui/tsconfig.node.json b/src/webview-ui/tsconfig.node.json index 0d3d714..71bea9f 100644 --- a/src/webview-ui/tsconfig.node.json +++ b/src/webview-ui/tsconfig.node.json @@ -18,5 +18,6 @@ "noUnusedParameters": true, "noFallthroughCasesInSwitch": true }, - "include": ["vite.config.ts"] + "include": ["vite.config.ts"], + "exclude": ["node_modules", "dist"] } diff --git a/tsconfig.json b/tsconfig.json index f5e8a25..5109610 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -6,12 +6,18 @@ "lib": ["ES2022", "DOM"], "sourceMap": false, "rootDir": "src", + "skipLibCheck": true, "strict": true /* enable all strict type-checking options */, /* Additional Checks */ // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ // "noUnusedParameters": true, /* Report errors on unused parameters. */ "esModuleInterop": true, - "resolveJsonModule": true - } + "resolveJsonModule": true, + "paths": { + "@/*": ["./src/webview-ui/src/*"] + }, + "jsx": "react-jsx" + }, + "exclude": ["node_modules", "dist"] }