agentram 0.1.8 → 0.1.9

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.
@@ -4,6 +4,7 @@ from concurrent.futures import ThreadPoolExecutor, as_completed
4
4
  from dataclasses import dataclass, field
5
5
  import json
6
6
  import os
7
+ import re
7
8
  import shlex
8
9
  import subprocess
9
10
  import urllib.error
@@ -219,4 +220,10 @@ def parse_openai_sse(raw: str) -> str:
219
220
  message = choice.get("message", {})
220
221
  if isinstance(message, dict) and message.get("content"):
221
222
  parts.append(str(message.get("content")))
222
- return "".join(parts).strip()
223
+ return strip_thinking_blocks("".join(parts)).strip()
224
+
225
+ def strip_thinking_blocks(text: str) -> str:
226
+ text = re.sub(r"<thinking>.*?</thinking>", "", text, flags=re.DOTALL | re.IGNORECASE)
227
+ text = re.sub(r"<think>.*?</think>", "", text, flags=re.DOTALL | re.IGNORECASE)
228
+ text = re.sub(r"^\s*</?(thinking|think)>\s*", "", text, flags=re.IGNORECASE)
229
+ return text.strip()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentram",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "description": "Async, model-agnostic Working RAM for coding agents.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/trancongnghia/AGENT_RAM#readme",
package/pyproject.toml CHANGED
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "agentram"
7
- version = "0.1.8"
7
+ version = "0.1.9"
8
8
  description = "Async, model-agnostic RAM layer for agentic coding tools."
9
9
  readme = "README.md"
10
10
  license = "MIT"