@humanu/orchestra 0.5.59 → 0.5.61

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@humanu/orchestra",
3
- "version": "0.5.59",
3
+ "version": "0.5.61",
4
4
  "description": "AI-powered Git worktree and tmux session manager with modern TUI",
5
5
  "keywords": [
6
6
  "git",
@@ -1559,18 +1559,15 @@ EOF
1559
1559
  -F "file=@$context_file;type=text/plain" 2>/dev/null)
1560
1560
  rm -f "$context_file"
1561
1561
 
1562
- openai_file_id=$(echo "$file_upload_resp" | python3 - <<'PYCODE' 2>/dev/null || true
1563
- import json
1564
- import sys
1565
-
1562
+ openai_file_id=""
1563
+ if have_cmd python3; then
1564
+ openai_file_id="$(python3 -c 'import json,sys
1566
1565
  try:
1567
1566
  data = json.load(sys.stdin)
1568
1567
  except Exception:
1569
1568
  data = {}
1570
-
1571
- print(data.get("id", ""))
1572
- PYCODE
1573
- )
1569
+ print(data.get("id", ""))' <<<"$file_upload_resp" 2>/dev/null || true)"
1570
+ fi
1574
1571
 
1575
1572
  if [[ -n "$openai_file_id" ]]; then
1576
1573
  local responses_body responses_resp ai_desc
@@ -1621,12 +1618,11 @@ PYCODE
1621
1618
  curl -s -X DELETE "https://api.openai.com/v1/files/$openai_file_id" \
1622
1619
  -H "Authorization: Bearer $OPENAI_API_KEY" >/dev/null 2>&1 || true
1623
1620
 
1624
- ai_desc=$(echo "$responses_resp" | python3 - <<'PYCODE'
1625
- import json
1621
+ ai_desc="$(python3 -c 'import json
1626
1622
  import re
1627
1623
  import sys
1628
1624
 
1629
- def clean(value: str) -> str:
1625
+ def clean(value):
1630
1626
  value = (value or "").strip().lower()
1631
1627
  value = re.sub(r"[^a-z0-9_ -]+", "", value)
1632
1628
  value = value.replace(" ", "_")
@@ -1675,9 +1671,7 @@ if isinstance(obj, dict):
1675
1671
  if not description and text:
1676
1672
  description = clean(text)
1677
1673
 
1678
- print(description)
1679
- PYCODE
1680
- )
1674
+ print(description)' <<<"$responses_resp" 2>/dev/null || true)"
1681
1675
 
1682
1676
  if [[ -n "$ai_desc" ]]; then
1683
1677
  new_name="$ai_desc"