zerochat 10.9.0__tar.gz → 10.11.0__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.
- {zerochat-10.9.0/zerochat.egg-info → zerochat-10.11.0}/PKG-INFO +1 -1
- {zerochat-10.9.0 → zerochat-10.11.0}/pyproject.toml +1 -1
- {zerochat-10.9.0 → zerochat-10.11.0/zerochat.egg-info}/PKG-INFO +1 -1
- {zerochat-10.9.0 → zerochat-10.11.0}/zerochat.py +15 -5
- {zerochat-10.9.0 → zerochat-10.11.0}/LICENSE +0 -0
- {zerochat-10.9.0 → zerochat-10.11.0}/README.md +0 -0
- {zerochat-10.9.0 → zerochat-10.11.0}/setup.cfg +0 -0
- {zerochat-10.9.0 → zerochat-10.11.0}/zerochat.egg-info/SOURCES.txt +0 -0
- {zerochat-10.9.0 → zerochat-10.11.0}/zerochat.egg-info/dependency_links.txt +0 -0
- {zerochat-10.9.0 → zerochat-10.11.0}/zerochat.egg-info/entry_points.txt +0 -0
- {zerochat-10.9.0 → zerochat-10.11.0}/zerochat.egg-info/top_level.txt +0 -0
|
@@ -54,7 +54,7 @@ import zlib
|
|
|
54
54
|
from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer
|
|
55
55
|
from pathlib import Path
|
|
56
56
|
|
|
57
|
-
SOURCE_BACKEND_VERSION = "10.
|
|
57
|
+
SOURCE_BACKEND_VERSION = "10.11.0"
|
|
58
58
|
|
|
59
59
|
def _read_source_version(filename: str) -> str | None:
|
|
60
60
|
"""Lee la versión de un archivo del repositorio cuando se ejecuta desde fuentes."""
|
|
@@ -2143,12 +2143,11 @@ def get_rule_offer(tool_name: str, args: dict, auth_eval: dict) -> dict | None:
|
|
|
2143
2143
|
base_name = get_command_base_name(command)
|
|
2144
2144
|
if not base_name:
|
|
2145
2145
|
return None
|
|
2146
|
-
short_name = base_name.split("/")[-1]
|
|
2147
2146
|
return {
|
|
2148
2147
|
"type": "command",
|
|
2149
2148
|
"command": base_name,
|
|
2150
2149
|
"constraints": {
|
|
2151
|
-
"command": {"allowedPrefixes": [
|
|
2150
|
+
"command": {"allowedPrefixes": [base_name], "allowChaining": False, "allowPipes": False}
|
|
2152
2151
|
}
|
|
2153
2152
|
}
|
|
2154
2153
|
path = auth_eval.get("directoryPath") or get_path_arg(args)
|
|
@@ -5149,9 +5148,20 @@ def save_conversation(session_meta: dict, messages: list[dict] | None = None) ->
|
|
|
5149
5148
|
if session_meta.get("serverRun") is not None:
|
|
5150
5149
|
extra["server_run"] = bool(session_meta.get("serverRun"))
|
|
5151
5150
|
|
|
5152
|
-
extra_json = json.dumps(extra, ensure_ascii=False) if extra else "{}"
|
|
5153
|
-
|
|
5154
5151
|
with open_storage() as conn:
|
|
5152
|
+
existing = conn.execute("SELECT created_at, extra_json, title FROM conversations WHERE id = ?;", (session_id,)).fetchone()
|
|
5153
|
+
if existing:
|
|
5154
|
+
if not session_meta.get("createdAt") and existing["created_at"]:
|
|
5155
|
+
created_at = int(existing["created_at"])
|
|
5156
|
+
if not title and existing["title"]:
|
|
5157
|
+
title = existing["title"]
|
|
5158
|
+
existing_extra = json.loads(existing["extra_json"]) if existing["extra_json"] else {}
|
|
5159
|
+
merged_extra = dict(existing_extra)
|
|
5160
|
+
merged_extra.update(extra)
|
|
5161
|
+
extra = merged_extra
|
|
5162
|
+
|
|
5163
|
+
extra_json = json.dumps(extra, ensure_ascii=False) if extra else "{}"
|
|
5164
|
+
|
|
5155
5165
|
conn.execute("""
|
|
5156
5166
|
INSERT INTO conversations (id, title, created_at, updated_at, message_count, extra_json)
|
|
5157
5167
|
VALUES (?, ?, ?, ?, ?, ?)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|