meshapi-code 0.4.1__tar.gz → 0.4.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (22) hide show
  1. {meshapi_code-0.4.1 → meshapi_code-0.4.2}/PKG-INFO +1 -1
  2. {meshapi_code-0.4.1 → meshapi_code-0.4.2}/pyproject.toml +1 -1
  3. meshapi_code-0.4.2/src/meshapi/__init__.py +1 -0
  4. {meshapi_code-0.4.1 → meshapi_code-0.4.2}/src/meshapi/tools.py +12 -0
  5. meshapi_code-0.4.1/src/meshapi/__init__.py +0 -1
  6. {meshapi_code-0.4.1 → meshapi_code-0.4.2}/.github/workflows/publish.yml +0 -0
  7. {meshapi_code-0.4.1 → meshapi_code-0.4.2}/.gitignore +0 -0
  8. {meshapi_code-0.4.1 → meshapi_code-0.4.2}/CLAUDE.md +0 -0
  9. {meshapi_code-0.4.1 → meshapi_code-0.4.2}/LICENSE +0 -0
  10. {meshapi_code-0.4.1 → meshapi_code-0.4.2}/NOTICE +0 -0
  11. {meshapi_code-0.4.1 → meshapi_code-0.4.2}/README.md +0 -0
  12. {meshapi_code-0.4.1 → meshapi_code-0.4.2}/src/meshapi/__main__.py +0 -0
  13. {meshapi_code-0.4.1 → meshapi_code-0.4.2}/src/meshapi/attachments.py +0 -0
  14. {meshapi_code-0.4.1 → meshapi_code-0.4.2}/src/meshapi/cli.py +0 -0
  15. {meshapi_code-0.4.1 → meshapi_code-0.4.2}/src/meshapi/client.py +0 -0
  16. {meshapi_code-0.4.1 → meshapi_code-0.4.2}/src/meshapi/commands.py +0 -0
  17. {meshapi_code-0.4.1 → meshapi_code-0.4.2}/src/meshapi/config.py +0 -0
  18. {meshapi_code-0.4.1 → meshapi_code-0.4.2}/src/meshapi/keywatcher.py +0 -0
  19. {meshapi_code-0.4.1 → meshapi_code-0.4.2}/src/meshapi/permissions.py +0 -0
  20. {meshapi_code-0.4.1 → meshapi_code-0.4.2}/src/meshapi/plan.py +0 -0
  21. {meshapi_code-0.4.1 → meshapi_code-0.4.2}/src/meshapi/render.py +0 -0
  22. {meshapi_code-0.4.1 → meshapi_code-0.4.2}/src/meshapi/statusbar.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: meshapi-code
3
- Version: 0.4.1
3
+ Version: 0.4.2
4
4
  Summary: Terminal chat for Mesh API — OpenAI-compatible LLM gateway
5
5
  Project-URL: Homepage, https://meshapi.ai
6
6
  Project-URL: Documentation, https://docs.meshapi.ai
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "meshapi-code"
3
- version = "0.4.1"
3
+ version = "0.4.2"
4
4
  description = "Terminal chat for Mesh API — OpenAI-compatible LLM gateway"
5
5
  readme = "README.md"
6
6
  license = "Apache-2.0"
@@ -0,0 +1 @@
1
+ __version__ = "0.4.2"
@@ -212,6 +212,18 @@ def execute(name: str, arguments: dict) -> str:
212
212
  path = arguments.get("path")
213
213
  if not path:
214
214
  return "Error: read_file requires a `path` argument."
215
+ # Guard against reading an image as text — return a helpful message
216
+ # so the model directs the user to /image instead of looping on a
217
+ # utf-8 decode error.
218
+ suffix = Path(path).suffix.lower()
219
+ if suffix in (".png", ".jpg", ".jpeg", ".gif", ".webp"):
220
+ return (
221
+ f"Error: {Path(path).name} is an image file and read_file only "
222
+ "reads text. Tell the user to attach the image instead — either "
223
+ f"by typing `/image {path}` or by including the path in their "
224
+ "next prompt (auto-attach picks up paths starting with /, ~, "
225
+ "./, ../, or http(s)://)."
226
+ )
215
227
  try:
216
228
  return Path(path).expanduser().read_text()
217
229
  except Exception as e:
@@ -1 +0,0 @@
1
- __version__ = "0.4.1"
File without changes
File without changes
File without changes
File without changes
File without changes