Merge dev to main for 0.2.0 - #17
Conversation
- Introduced `/image <path> [prompt]` command to send local images to vision-capable models. - Updated `_message` function to handle images in messages. - Enhanced REPL input with image command suggestion. - Added tests for message handling with and without images.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bcd11df325
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| res, err = _chat_with_status( | ||
| console, client, [system_message] + messages, tools | ||
| console, client, [system_message] + messages, tools, | ||
| is_image=bool(pending_images), |
There was a problem hiding this comment.
Disable tool calling for image-only models
When /image sets pending_images, this call still sends the full tools list to Ollama. Common vision models such as the documented llama3.2-vision are image-capable but not tool-capable, so Ollama rejects the request before the model can answer; image recognition will fail for the recommended setup unless tools are omitted or gated for image turns.
Useful? React with 👍 / 👎.
| warn("Usage: /image <path> [prompt]") | ||
| continue | ||
| try: | ||
| parts = shlex.split(arg) |
There was a problem hiding this comment.
Preserve Windows backslashes when parsing image paths
On Windows, unquoted paths normally contain backslashes, but shlex.split defaults to POSIX escaping, so an input like /image C:\Users\me\Pictures\cat.png describe is parsed as C:UsersmePicturescat.png and then fails the is_file() check. This makes the new image command unusable for ordinary Windows paths unless users quote or double-escape them; parse with Windows-aware rules or split the first argument without consuming backslashes.
Useful? React with 👍 / 👎.
| if count > MAX_SEARCH_FILES: | ||
| return |
There was a problem hiding this comment.
Surface incomplete grep/glob scans
For repositories with more than 5,000 non-excluded files, _iter_files silently returns before scanning the rest of the tree. Because glob_tool/grep_tool can then report No matches even when later files contain matches, and the system prompt tells the model to prefer these tools for codebase search, users can get incorrect search results with no truncation warning.
Useful? React with 👍 / 👎.
No description provided.