closecode-ai 0.2.1__tar.gz → 0.3.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.
- {closecode_ai-0.2.1 → closecode_ai-0.3.0}/PKG-INFO +1 -1
- {closecode_ai-0.2.1 → closecode_ai-0.3.0}/closecode_ai.egg-info/PKG-INFO +1 -1
- {closecode_ai-0.2.1 → closecode_ai-0.3.0}/pyproject.toml +1 -1
- {closecode_ai-0.2.1 → closecode_ai-0.3.0}/session.py +22 -2
- {closecode_ai-0.2.1 → closecode_ai-0.3.0}/README.md +0 -0
- {closecode_ai-0.2.1 → closecode_ai-0.3.0}/agent.py +0 -0
- {closecode_ai-0.2.1 → closecode_ai-0.3.0}/closecode_ai.egg-info/SOURCES.txt +0 -0
- {closecode_ai-0.2.1 → closecode_ai-0.3.0}/closecode_ai.egg-info/dependency_links.txt +0 -0
- {closecode_ai-0.2.1 → closecode_ai-0.3.0}/closecode_ai.egg-info/entry_points.txt +0 -0
- {closecode_ai-0.2.1 → closecode_ai-0.3.0}/closecode_ai.egg-info/requires.txt +0 -0
- {closecode_ai-0.2.1 → closecode_ai-0.3.0}/closecode_ai.egg-info/top_level.txt +0 -0
- {closecode_ai-0.2.1 → closecode_ai-0.3.0}/config.py +0 -0
- {closecode_ai-0.2.1 → closecode_ai-0.3.0}/debug_response.py +0 -0
- {closecode_ai-0.2.1 → closecode_ai-0.3.0}/guardrails.py +0 -0
- {closecode_ai-0.2.1 → closecode_ai-0.3.0}/harness.py +0 -0
- {closecode_ai-0.2.1 → closecode_ai-0.3.0}/llm.py +0 -0
- {closecode_ai-0.2.1 → closecode_ai-0.3.0}/main.py +0 -0
- {closecode_ai-0.2.1 → closecode_ai-0.3.0}/mcp_tools.py +0 -0
- {closecode_ai-0.2.1 → closecode_ai-0.3.0}/modes.py +0 -0
- {closecode_ai-0.2.1 → closecode_ai-0.3.0}/render.py +0 -0
- {closecode_ai-0.2.1 → closecode_ai-0.3.0}/search.py +0 -0
- {closecode_ai-0.2.1 → closecode_ai-0.3.0}/setup.cfg +0 -0
- {closecode_ai-0.2.1 → closecode_ai-0.3.0}/todos.py +0 -0
- {closecode_ai-0.2.1 → closecode_ai-0.3.0}/token_tracker.py +0 -0
- {closecode_ai-0.2.1 → closecode_ai-0.3.0}/tools.py +0 -0
- {closecode_ai-0.2.1 → closecode_ai-0.3.0}/tui.py +0 -0
- {closecode_ai-0.2.1 → closecode_ai-0.3.0}/ui.py +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "closecode-ai"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.3.0"
|
|
8
8
|
description = "CloseCode — an agentic terminal coding assistant (LangGraph + OpenRouter + MCP)"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
@@ -1,5 +1,13 @@
|
|
|
1
|
+
"""Session persistence using SQLite, stored in a user-level directory
|
|
2
|
+
(~/.closecode/sessions/sessions.db by default) instead of the project
|
|
3
|
+
folder. The location can be overridden with the CLOSECODE_SESSIONS_DIR
|
|
4
|
+
env var (mainly so tests can point it at a temp dir).
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from __future__ import annotations
|
|
1
8
|
|
|
2
9
|
import json
|
|
10
|
+
import os
|
|
3
11
|
import sqlite3
|
|
4
12
|
import time
|
|
5
13
|
from dataclasses import dataclass
|
|
@@ -8,7 +16,19 @@ from typing import Optional
|
|
|
8
16
|
|
|
9
17
|
from langchain_core.messages import messages_from_dict, messages_to_dict
|
|
10
18
|
|
|
11
|
-
|
|
19
|
+
SESSIONS_DIR_ENV = "CLOSECODE_SESSIONS_DIR"
|
|
20
|
+
SESSIONS_DIR_NAME = "sessions"
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def _sessions_dir() -> Path:
|
|
24
|
+
"""User-level sessions directory, created on first use."""
|
|
25
|
+
override = os.environ.get(SESSIONS_DIR_ENV, "").strip()
|
|
26
|
+
base = Path(override).expanduser() if override else Path.home() / ".closecode" / SESSIONS_DIR_NAME
|
|
27
|
+
base.mkdir(parents=True, exist_ok=True)
|
|
28
|
+
return base
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
SESSIONS_DIR = _sessions_dir()
|
|
12
32
|
DB_PATH = SESSIONS_DIR / "sessions.db"
|
|
13
33
|
|
|
14
34
|
_SCHEMA = """
|
|
@@ -194,4 +214,4 @@ def rename_session(session_id: int, name: str) -> bool:
|
|
|
194
214
|
|
|
195
215
|
|
|
196
216
|
_init()
|
|
197
|
-
_migrate_from_json()
|
|
217
|
+
_migrate_from_json()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|