fix: strip inline comments in env file parser, fix backtick syntax errors
loadEnvFile now strips " # ..." suffixes from values so inline comments in ~/.config/ollie/env don't leak into environment variables. Also add kiro to the supported-backends error message and fix two raw-string backtick escaping errors in tool descriptions.
This commit is contained in:
parent
f9918525d5
commit
4786866e66
|
|
@ -28,6 +28,9 @@ func loadEnvFile(path string) {
|
|||
continue
|
||||
}
|
||||
k = strings.TrimSpace(k)
|
||||
if i := strings.Index(v, " #"); i >= 0 {
|
||||
v = v[:i]
|
||||
}
|
||||
v = strings.TrimSpace(v)
|
||||
if k != "" && os.Getenv(k) == "" {
|
||||
os.Setenv(k, v)
|
||||
|
|
@ -79,7 +82,7 @@ func New() (Backend, error) {
|
|||
case "kiro", "codewhisperer":
|
||||
return NewCodeWhisperer(os.Getenv("OLLIE_KIRO_TOKEN"))
|
||||
default:
|
||||
return nil, fmt.Errorf("unknown OLLIE_BACKEND %q (supported: ollama, openai, openrouter, anthropic, copilot)", which)
|
||||
return nil, fmt.Errorf("unknown OLLIE_BACKEND %q (supported: ollama, openai, openrouter, anthropic, copilot, kiro)", which)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ Usage:
|
|||
- Default timeout: 30 seconds
|
||||
|
||||
Tool Discovery:
|
||||
- List tools: \`execute_code('ls ' + \"" + ToolsPath() + "\")\`
|
||||
- List tools: execute_code with 'ls ` + ToolsPath() + `'
|
||||
- Check script permissions before execution
|
||||
|
||||
Examples:
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ Usage:
|
|||
|
||||
Notes:
|
||||
- Use offset/limit parameters for large files
|
||||
- Read directories with \`execute_code('ls <path>')\`, not this tool
|
||||
- Read directories with execute_code, not this tool
|
||||
- Call multiple file_read operations in parallel when exploring
|
||||
- Always read a file before editing or writing to it with file_edit/file_write`,
|
||||
InputSchema: json.RawMessage(`{
|
||||
|
|
|
|||
Reference in New Issue