generateLongPrompt 生成测试用的长 prompt
()
| 94 | |
| 95 | // generateLongPrompt 生成测试用的长 prompt |
| 96 | func generateLongPrompt() string { |
| 97 | return `# System Prompt |
| 98 | |
| 99 | You are a helpful AI assistant. |
| 100 | |
| 101 | ## Tools Manual |
| 102 | |
| 103 | This section describes the available tools: |
| 104 | |
| 105 | ### ReadFile |
| 106 | Read contents of a file from the filesystem. |
| 107 | Parameters: |
| 108 | - path: The file path to read |
| 109 | |
| 110 | ### WriteFile |
| 111 | Write contents to a file. |
| 112 | Parameters: |
| 113 | - path: The file path to write |
| 114 | - content: The content to write |
| 115 | |
| 116 | ### Bash |
| 117 | Execute a shell command. |
| 118 | Parameters: |
| 119 | - command: The command to execute |
| 120 | |
| 121 | ## Security Guidelines |
| 122 | |
| 123 | IMPORTANT: Follow these security rules at all times: |
| 124 | |
| 125 | 1. Never expose API keys or credentials |
| 126 | 2. Always validate user input before processing |
| 127 | 3. Use secure connections for network operations |
| 128 | 4. Do not execute arbitrary code without user confirmation |
| 129 | 5. Protect sensitive data in transit and at rest |
| 130 | |
| 131 | ## General Instructions |
| 132 | |
| 133 | When responding to user queries: |
| 134 | 1. Be helpful and accurate |
| 135 | 2. Provide clear explanations |
| 136 | 3. Use examples when helpful |
| 137 | 4. Ask clarifying questions when needed |
| 138 | |
| 139 | ## Code Style Guidelines |
| 140 | |
| 141 | Follow these coding conventions: |
| 142 | - Use meaningful variable names |
| 143 | - Add comments for complex logic |
| 144 | - Follow the project's existing patterns |
| 145 | - Write tests for new functionality |
| 146 | |
| 147 | ## Error Handling |
| 148 | |
| 149 | When errors occur: |
| 150 | 1. Log the error with context |
| 151 | 2. Provide user-friendly error messages |
| 152 | 3. Suggest possible solutions |
| 153 | 4. Never expose internal details |
no outgoing calls
no test coverage detected