1. add instructions example

2. add .vscode configurations
This commit is contained in:
blade 2025-12-17 13:13:56 +08:00
parent 2521c6971f
commit 501514d404
5 changed files with 248 additions and 0 deletions

50
.vscode/README.md vendored Normal file
View File

@ -0,0 +1,50 @@
# Python环境配置说明
## 自动配置Python解释器
本项目已移除硬编码的Python路径支持在不同电脑上自动检测Python环境。
### 首次使用步骤:
1. **打开Cursor**
2. **选择Python解释器**
- 按 `Ctrl+Shift+P`
- 搜索 "Python: Select Interpreter"
- 选择您系统中的Python解释器
3. **验证配置**
- 打开 `test_autocomplete.py` 文件
- 尝试输入代码,检查是否有自动补全功能
### 支持的Python环境
- **Anaconda/Miniconda**自动检测conda环境
- **Python官方安装包**检测系统PATH中的python
- **虚拟环境**支持venv、virtualenv等
- **Docker容器**支持远程Python解释器
### 代码提示功能:
**已启用的功能**
- 智能代码补全
- 函数参数提示
- 类型提示
- 自动导入建议
- 悬停信息显示
- 语法错误检测
- 代码格式化
### 故障排除:
如果代码提示不工作:
1. **重启语言服务器**`Ctrl+Shift+P` → "Python: Restart Language Server"
2. **重新加载窗口**`Ctrl+Shift+P` → "Developer: Reload Window"
3. **检查Python扩展**确保Python扩展已安装并启用
4. **验证解释器**确保选择的Python解释器路径正确
### 配置文件说明:
- `.vscode/settings.json`:项目级设置,包含代码提示配置
- `python_settings.json`通用Python配置模板
- 全局设置:已移除硬编码路径,保持代码提示功能

16
.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,16 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python Debugger: Current File",
"type": "debugpy",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"cwd": "${workspaceFolder:huaikai_ai}"
}
]
}

20
.vscode/python_settings.json vendored Normal file
View File

@ -0,0 +1,20 @@
{
"python.analysis.autoImportCompletions": true,
"python.analysis.typeCheckingMode": "basic",
"python.analysis.autoSearchPaths": true,
"python.analysis.diagnosticMode": "workspace",
"python.analysis.indexing": true,
"python.analysis.completeFunctionParens": true,
"python.analysis.inlayHints.functionReturnTypes": true,
"python.analysis.inlayHints.variableTypes": true,
"python.analysis.inlayHints.pytestParameters": true,
"python.linting.enabled": true,
"python.linting.pylintEnabled": false,
"python.linting.flake8Enabled": true,
"python.formatting.provider": "black",
"python.terminal.activateEnvironment": true,
"python.terminal.activateEnvInCurrentTerminal": true,
"files.associations": {
"*.py": "python"
}
}

53
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,53 @@
{
"python.analysis.autoImportCompletions": true,
"python.analysis.typeCheckingMode": "basic",
"python.analysis.autoSearchPaths": true,
"python.analysis.diagnosticMode": "workspace",
"python.analysis.stubPath": "./typings",
"python.analysis.extraPaths": [
"./core",
"./utils"
],
"editor.quickSuggestions": {
"other": true,
"comments": false,
"strings": true
},
"editor.suggestOnTriggerCharacters": true,
"editor.acceptSuggestionOnEnter": "on",
"editor.tabCompletion": "on",
"editor.wordBasedSuggestions": "matchingDocuments",
"editor.parameterHints.enabled": true,
"editor.hover.enabled": true,
"editor.codeActionsOnSave": {
"source.organizeImports": "explicit"
},
"python.linting.enabled": true,
"python.linting.pylintEnabled": false,
"python.linting.flake8Enabled": true,
"python.formatting.provider": "black",
"python.analysis.completeFunctionParens": true,
"python.analysis.inlayHints.functionReturnTypes": true,
"python.analysis.inlayHints.variableTypes": true,
"python.analysis.inlayHints.pytestParameters": true,
"files.associations": {
"*.py": "python"
},
"python.analysis.indexing": true,
"python.terminal.activateEnvironment": true,
"python.terminal.activateEnvInCurrentTerminal": true,
"python.analysis.packageIndexDepths": [
{
"name": "pandas",
"depth": 2
},
{
"name": "numpy",
"depth": 2
},
{
"name": "requests",
"depth": 2
}
]
}

View File

@ -0,0 +1,109 @@
# Instructions
## 需求描述
您是一位资深的鞋子产品质量检测员。
请仔细阅读这张鞋子的图片,并且对鞋子的各个组成部分的细节做出详细描述。
鞋子细节项目如下:
1. 总体描述
款式:运动鞋、皮鞋、足球鞋、靴子等
适用人群:儿童、成人
适用性别:男、女、通用
颜色:浅蓝色、深蓝色、粉红色、明黄色等,要求对颜色描述的用词准确
2. 鞋子各个组成部分描述
鞋子的各个组成部分有:
a. 前鞋帮,包括帮面、魔术贴、装饰性附件
b. 测鞋帮,包括帮面
c. 后鞋帮,包括帮面
d. 鞋舌,包括衬里,前提带,后提带
e. 鞋带,
f. 鞋外底,
g. 鞋头
请描述鞋子的各个组成部分的细节:
a. 颜色,如浅蓝色,如果有多个颜色,请一并输出,如红色、白色、绿色
b. 材料:如织物、聚合物、仿皮、皮革等
c. 印字颜色:如果有印字,则输出印字颜色,如白色,否则输出无
# 输出要求
请根据图片中的鞋子细节对总体以及各个组成部分进行描述不仅输出中文而且需要输出英文并通过JSON格式输出示例如下
{
"款式": {"中文": "运动鞋", "英文": "sports shoes"},
"适用人群": {"中文": "儿童", "英文": "children"},
"适用性别": {"中文": "通用", "英文": "General"}
"总体颜色": {"中文": "浅蓝色", "英文": "light blue"},
"组成部分": {
"前鞋帮": {
"英文名称": "upper-front part",
"帮面": {
"英文名称": "upper part",
"颜色": {"中文": ["浅蓝色"], "英文": ["light blue"]},
"材料": {"中文": "织物", "英文": "fabric"},
"印字颜色": {"中文": "无" "英文": "N/A"}},
"魔术贴": {
"英文名称": "velcro strap",
"颜色": {"中文": ["浅蓝色"], "英文": ["light blue"]},
"材料": {"中文": "织物", "英文": "fabric"},
"印字颜色": {"中文": "白色" "英文": "white"}},
"装饰性附件": {
"英文名称": "ornamental trim",
"颜色": {"中文": ["黑色", "黄色", "绿色", "橙色"], "英文": ["black", "yellow", "green", "orange"]},
"材料": {"中文": "聚合物", "英文": "polymer"},
"印字颜色": {"中文": "无" "英文": "N/A"}}
},
"侧鞋帮": {
"英文名称": "upper-side part",
"帮面": {
"英文名称": "upper part",
"颜色": {"中文": ["浅蓝色"], "英文": ["light blue"]},
"材料": {"中文": "织物", "英文": "fabric"},
"印字颜色": {"中文": "无" "英文": "N/A"}}
},
"后鞋帮": {
"英文名称": "upper-back part",
"帮面": {
"英文名称": "upper part",
"颜色": {"中文": ["深蓝色"], "英文": ["dark blue"]},
"材料": {"中文": "织物", "英文": "fabric"},
"印字颜色": {"中文": "无" "英文": "N/A"}}
},
"鞋舌": {
"英文名称": "tongue part",
"衬里": {
"英文名称": "lining-tongue part",
"颜色": {"中文": ["白色"], "英文": ["white"]},
"材料": {"中文": "织物", "英文": "fabric"},
"印字颜色": {"中文": "无" "英文": "N/A"}},
"前提带": {
"英文名称": "tongue pull tab",
"颜色": {"中文": ["橙色"], "英文": ["orange"]},
"材料": {"中文": "织物", "英文": "fabric"},
"印字颜色": {"中文": ["白色"], "英文": ["white"]}},
"后提带": {
"英文名称": "rear pull tab",
"颜色": {"中文": ["浅绿色"], "英文": ["light green"]},
"材料": {"中文": "织物", "英文": "fabric"},
"印字颜色": {"中文": "无" "英文": "N/A"}}
},
"鞋带": {
"英文名称": "shoelace",
"颜色": {"中文": ["浅蓝色"], "英文": ["light blue"]},
"材料": {"中文": "织物", "英文": "fabric"},
"印字颜色": {"中文": "无" "英文": "N/A"}
},
"鞋外底": {
"英文名称": "outsole",
"颜色": {"中文": ["白色"], "英文": ["white"]},
"材料": {"中文": "聚合物", "英文": "polymer"},
"印字颜色": {"中文": "无" "英文": "N/A"}
},
"鞋头": {
"英文名称": "toe cap",
"颜色": {"中文": ["浅蓝色"], "英文": ["light blue"]},
"材料": {"中文": "仿皮", "英文": "PU leather"},
"印字颜色": {"中文": "无" "英文": "N/A"}
}
}
}
仔细观察后的结果请不要输出描述内容仅按照示例输出JSON格式的数据。
# Output