Skip to content

Commit 14aed28

Browse files
committed
更新AI智能体组件中的任务状态描述,明确要求提供完整、可编译的代码,禁止使用伪代码或占位符。同时,修改文件夹访问请求的模式为读写,以增强功能性和用户体验。
1 parent 9827e48 commit 14aed28

2 files changed

Lines changed: 9 additions & 5 deletions

File tree

src/components/AIagent.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -883,15 +883,15 @@ export default function AIagent({
883883
884884
\`\`\`task-status
885885
status: planning|executing|completed
886-
code: 要改动的代码
886+
code: 要改动的完整、真实代码(禁止伪代码、占位符或省略号)
887887
progress: 当前进度描述
888888
next_action: 下一步行动计划(如果有的话)
889889
\`\`\`
890890
891891
- **planning**: 正在分析任务和制定计划
892892
- **executing**: 正在执行具体的操作
893893
- **completed**: 任务已完成
894-
- **code**: 要改动的编程代码(必须包含)
894+
- **code**: 要改动的完整、可编译代码(必须包含,禁止伪代码、占位符或省略号
895895
896896
## 协作机制
897897
在每轮对话中,你应该:
@@ -988,15 +988,15 @@ You need to clearly identify the current task status in each response:
988988
989989
\`\`\`task-status
990990
status: planning|executing|completed
991-
code: code to be modified
991+
code: exact compilable code changes (NO pseudocode, placeholders or ellipses)
992992
progress: Current progress description
993993
next_action: Next action plan (if applicable)
994994
\`\`\`
995995
996996
- **planning**: Analyzing task and formulating plan
997997
- **executing**: Performing specific operations
998998
- **completed**: Task completed
999-
- **code**: need to modify programming code (must be included)
999+
- **code**: exact compilable code to be modified (must be included, NO pseudocode, placeholders or ellipses)
10001000
10011001
## Collaboration Mechanism
10021002
In each round of conversation, you should:
@@ -1751,13 +1751,15 @@ ${functions
17511751
17521752
\`\`\`task-status
17531753
status: planning|executing|completed
1754+
code: 要改动的完整、真实代码(禁止伪代码、占位符或省略号)
17541755
progress: 当前进度描述
17551756
next_action: 下一步行动计划(如果有的话)
17561757
\`\`\`
17571758
17581759
- **planning**: 正在分析任务和制定计划
17591760
- **executing**: 正在执行具体的操作
17601761
- **completed**: 任务已完成
1762+
- **code**: 要改动的完整、可编译代码(必须包含,禁止伪代码、占位符或省略号)
17611763
17621764
## 协作机制
17631765
在每轮对话中,你应该:
@@ -1854,13 +1856,15 @@ You need to clearly identify the current task status in each response:
18541856
18551857
\`\`\`task-status
18561858
status: planning|executing|completed
1859+
code: exact compilable code changes (NO pseudocode, placeholders or ellipses)
18571860
progress: Current progress description
18581861
next_action: Next action plan (if applicable)
18591862
\`\`\`
18601863
18611864
- **planning**: Analyzing task and formulating plan
18621865
- **executing**: Performing specific operations
18631866
- **completed**: Task completed
1867+
- **code**: exact compilable code to be modified (must be included, NO pseudocode, placeholders or ellipses)
18641868
18651869
## Collaboration Mechanism
18661870
In each round of conversation, you should:

src/lib/scanService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export async function requestDirectoryAccess(): Promise<FileSystemDirectoryHandl
3131
try {
3232
// 请求用户选择文件夹并授权访问
3333
const dirHandle = await window.showDirectoryPicker({
34-
mode: "read", // 只读模式
34+
mode: "readwrite",
3535
});
3636

3737
return dirHandle;

0 commit comments

Comments
 (0)