meshapi-code 0.4.1__py3-none-any.whl → 0.4.2__py3-none-any.whl
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.
- meshapi/__init__.py +1 -1
- meshapi/tools.py +12 -0
- {meshapi_code-0.4.1.dist-info → meshapi_code-0.4.2.dist-info}/METADATA +1 -1
- {meshapi_code-0.4.1.dist-info → meshapi_code-0.4.2.dist-info}/RECORD +8 -8
- {meshapi_code-0.4.1.dist-info → meshapi_code-0.4.2.dist-info}/WHEEL +0 -0
- {meshapi_code-0.4.1.dist-info → meshapi_code-0.4.2.dist-info}/entry_points.txt +0 -0
- {meshapi_code-0.4.1.dist-info → meshapi_code-0.4.2.dist-info}/licenses/LICENSE +0 -0
- {meshapi_code-0.4.1.dist-info → meshapi_code-0.4.2.dist-info}/licenses/NOTICE +0 -0
meshapi/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.4.
|
|
1
|
+
__version__ = "0.4.2"
|
meshapi/tools.py
CHANGED
|
@@ -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,4 +1,4 @@
|
|
|
1
|
-
meshapi/__init__.py,sha256=
|
|
1
|
+
meshapi/__init__.py,sha256=6hfVa12Q-nXyUEXr6SyKpqPEDJW6vlRHyPxlA27PfTs,22
|
|
2
2
|
meshapi/__main__.py,sha256=MSmt_5Xg84uHqzTN38JwgseJK8rsJn_11A8WD99VtEo,61
|
|
3
3
|
meshapi/attachments.py,sha256=Mpsxm66QT_cJV4TXlnYU23ZhFm4vdzFEyXDenXjxpEU,5475
|
|
4
4
|
meshapi/cli.py,sha256=N2uqztGWVCP3z6_kkPKUieWIiTrg187LN5Zy5640e_k,37447
|
|
@@ -10,10 +10,10 @@ meshapi/permissions.py,sha256=BPLYiPrlLR1js9k64szm9b11fXYx0ZZcQ2a08GLNRg8,1033
|
|
|
10
10
|
meshapi/plan.py,sha256=JWgzm2Qtbdso7nnoR7K896d7n7ufwlhT-2F09PGXXKs,2561
|
|
11
11
|
meshapi/render.py,sha256=VwgDbYSElwEJ0WhSMpRZ8Tw_EA0A09s8D4yVh_nUL3o,4737
|
|
12
12
|
meshapi/statusbar.py,sha256=yqF6fzCaZMXMzUmX1vzmKWAMbCe_YRsbnA27meA3vaw,1361
|
|
13
|
-
meshapi/tools.py,sha256=
|
|
14
|
-
meshapi_code-0.4.
|
|
15
|
-
meshapi_code-0.4.
|
|
16
|
-
meshapi_code-0.4.
|
|
17
|
-
meshapi_code-0.4.
|
|
18
|
-
meshapi_code-0.4.
|
|
19
|
-
meshapi_code-0.4.
|
|
13
|
+
meshapi/tools.py,sha256=lL8oxj7uxCyojmRvgjlzZSxs-DoIc8fhxnhiuNfm3RA,13728
|
|
14
|
+
meshapi_code-0.4.2.dist-info/METADATA,sha256=gCzLZHiASN2ljGD_CXxQpphNq5YKtWh4La50cxl69Tw,7595
|
|
15
|
+
meshapi_code-0.4.2.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
|
|
16
|
+
meshapi_code-0.4.2.dist-info/entry_points.txt,sha256=ZCXZ_SgrhWIQEHSjAXz0pUlyGbIQKZ68vp_Cg1Y0rME,45
|
|
17
|
+
meshapi_code-0.4.2.dist-info/licenses/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
|
|
18
|
+
meshapi_code-0.4.2.dist-info/licenses/NOTICE,sha256=wF-6Apse4eVIOpbNP3WLtTaOJClNFK7Jok2BnUvSo9U,191
|
|
19
|
+
meshapi_code-0.4.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|