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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: zerochat
3
- Version: 10.9.0
3
+ Version: 10.11.0
4
4
  Summary: Private local web client for AI models, tools and MCP services
5
5
  Author: Alberto Alday
6
6
  License-Expression: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "zerochat"
7
- version = "10.9.0"
7
+ version = "10.11.0"
8
8
  description = "Private local web client for AI models, tools and MCP services"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: zerochat
3
- Version: 10.9.0
3
+ Version: 10.11.0
4
4
  Summary: Private local web client for AI models, tools and MCP services
5
5
  Author: Alberto Alday
6
6
  License-Expression: MIT
@@ -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.9.0"
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": [short_name], "allowChaining": False, "allowPipes": False}
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