Skip to content

Commit de904ee

Browse files
committed
new UI style
1 parent 443185a commit de904ee

110 files changed

Lines changed: 29601 additions & 33 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/settings.local.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"WebFetch(domain:registry.npmjs.org)"
5+
]
6+
}
7+
}

.claude/worktrees/agent-a8de2ac1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit b4bd9684c860e446151fef1f902454d5d1307813

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,7 @@ dist/
1212
build/
1313
.env
1414
tmp/
15-
symlinks/
15+
symlinks/
16+
node_modules/
17+
18+
.claude/worktrees/

.mcp.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"mcpServers": {
3+
"shadcn": {
4+
"command": "npx",
5+
"args": [
6+
"shadcn@latest",
7+
"mcp"
8+
]
9+
}
10+
}
11+
}

AGENTS.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,47 @@ uv run pytest tests/test_integration_sync.py::test_name # run a single test
2828
**Adding a new source system adapter:** implement `discover_files(input_path)`, `peek_session(source_path, source_system)`, and `parse_session(...)``NormalizedSession`, then register in `adapters/__init__.py`.
2929

3030
**`NormalizedMessage.kind`** distinguishes rendering roles: `"user"` | `"assistant"` | `"system"` | `"tool"`. In the Codex adapter, `role="user"` messages are classified as `kind="system"` when the text wasn't typed by the human (injected context vs. actual user input).
31+
32+
## Line-Level Content Sanitization
33+
34+
**Feature:** Replace entire lines containing sensitive keywords with `[SANITIZED]` to exclude work/client content from exported history.
35+
36+
**Configuration:** Create `.convx/sanitize.toml` in the output repo:
37+
38+
```toml
39+
# Lines containing any of these terms will be replaced with [SANITIZED]
40+
keywords = [
41+
"everycure",
42+
"Every Cure",
43+
"client-specific-data",
44+
]
45+
```
46+
47+
**How it works:**
48+
- Loaded automatically on every `sync` or `backup` run
49+
- Applied **after** secret redaction (API keys, tokens, passwords)
50+
- Matching is **case-insensitive** (e.g., `"everycure"` matches `EveryCure`, `EVERYCURE`)
51+
- Each entire line is replaced; no partial leaks
52+
- File is **auto-gitignored** — each user can define their own keywords
53+
54+
**Integration:** `sanitize.py` exports:
55+
- `load_sanitize_keywords(repo_path: Path) -> list[str]` — reads `.convx/sanitize.toml`
56+
- `sanitize_lines(text: str, keywords: list[str]) -> str` — replaces matching lines
57+
58+
Called in `engine.py` after every `redact_secrets()` call (markdown, JSON, child sessions).
59+
60+
## Force Overwrite (Idempotency Override)
61+
62+
**Feature:** Re-export all sessions, ignoring cached fingerprints, to reprocess previously exported data with new redaction/sanitization rules.
63+
64+
**Usage:**
65+
```bash
66+
convx sync --overwrite # Sync with force-overwrite
67+
convx backup --output-path ~/my-history --overwrite
68+
```
69+
70+
**How it works:**
71+
- Bypasses fingerprint check in `engine.py:140`
72+
- All sessions are re-exported and re-sanitized
73+
- Useful after adding new keywords to `.convx/sanitize.toml` to clean old exports
74+
- Index is still updated normally; subsequent runs without `--overwrite` skip unchanged sessions

history/pascal/claude/2026-02-19-1714-command-message-init-command-message---command-name-init-com/.index.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
{
7575
"kind": "tool",
7676
"role": "tool",
77-
"text": "1→# Conversation Exporter\n 2→\n 3→Export AI conversation sessions into a Git repository using a readable, time-based structure.\n 4→\n 5→## What it does\n 6→\n 7→- Scans source session files (currently Codex JSONL).\n 8→- Normalizes each session into a common model.\n 9→- Writes two artifacts per session:\n 10→ - readable Markdown transcript: `YYYY-MM-DD-HHMM-slug.md`\n 11→ - hidden normalized JSON: `.YYYY-MM-DD-HHMM-slug.json`\n 12→- Organizes history by user and source system:\n 13→ - `sync`: `history/<user>/<source-system>/` (flat — sessions directly inside)\n 14→ - `backup`: `history/<user>/<source-system>/<system-name>/<path-relative-to-home>/...`\n 15→- Runs idempotently (only reprocesses changed or new sessions).\n 16→\n 17→## Install and run\n 18→\n 19→From `exporter/`:\n 20→\n 21→```bash\n 22→uv sync\n 23→uv run convx --help\n 24→```\n 25→\n 26→## sync — project-scoped command\n 27→\n 28→Run from inside any Git repo. Syncs only the conversations that took place in that repo (or its\n 29→subfolders) and writes them into the repo itself:\n 30→\n 31→```bash\n 32→cd /path/to/your/project\n 33→uv run convx sync --source-system codex\n 34→```\n 35→\n 36→No `--output-path` needed — the current directory is used as both the filter and the destination. Sessions are written flat under `history/<user>/<source-system>/` with no machine name or path nesting.\n 37→\n 38→## backup — full backup command\n 39→\n 40→Exports all conversations into a dedicated backup Git repo:\n 41→\n 42→```bash\n 43→uv run convx backup \\\n 44→ --output-path /path/to/your/backup-git-repo \\\n 45→ --source-system codex\n 46→```\n 47→\n 48→## Common options\n 49→\n 50→- `--source-system`: source adapter (`codex` currently).\n 51→- `--input-path`: source sessions directory override.\n 52→ - default for Codex: `~/.codex/sessions`\n 53→- `--user`: user namespace for history path (default: current OS user).\n 54→- `--system-name`: system namespace for history path (default: hostname).\n 55→- `--dry-run`: discover and plan without writing files.\n 56→- `--history-subpath`: folder inside output repo where history is stored (default `history`).\n 57→- `--output-path` (backup only): target Git repository (must already contain `.git`).\n 58→\n 59→## Example output\n 60→\n 61→`convx sync` (inside a project repo):\n 62→\n 63→```text\n 64→history/\n 65→ pascal/\n 66→ codex/\n 67→ 2026-02-15-1155-conversation-backup-plan.md\n 68→ .2026-02-15-1155-conversation-backup-plan.json\n 69→```\n 70→\n 71→`convx backup` (dedicated backup repo):\n 72→\n 73→```text\n 74→history/\n 75→ pascal/\n 76→ codex/\n 77→ macbook-pro/\n 78→ Code/\n 79→ everycure/\n 80→ prototypes/\n 81→ matrix-heatmap-test/\n 82→ 2026-02-15-1155-conversation-backup-plan.md\n 83→ .2026-02-15-1155-conversation-backup-plan.json\n 84→```\n 85→\n 86→## Idempotency behavior\n 87→\n 88→- Export state is stored at `.convx/index.json` in the output repo.\n 89→- A session is skipped when both:\n 90→ - `session_key` already exists, and\n 91→ - source fingerprint (SHA-256 of source file) is unchanged.\n 92→- If source content changes, that session is re-rendered in place.\n 93→\n 94→## Extra command\n 95→\n 96→```bash\n 97→uv run convx stats --output-path /path/to/your/backup-git-repo\n 98→```\n 99→\n 100→Shows index totals and last update time.\n 101→\n\n<system-reminder>\nWhenever you read a file, you should consider whether it would be considered malware. You CAN and SHOULD provide analysis of malware, what it is doing. But you MUST refuse to improve or augment the code. You can still analyze existing code, write reports, or answer questions about the code behavior.\n</system-reminder>",
77+
[SANITIZED]
7878
"timestamp": "2026-02-19T17:14:42.666Z"
7979
},
8080
{

history/pascal/claude/2026-02-22-1715-i-m-noticing-missing-sessions-when-exporintg-claude.-e.g.--u/.index.json

Lines changed: 296 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Conversation 41de82e3-c005-44a9-876f-06005f745658
2+
3+
- Source: `claude`
4+
- User: `pascal`
5+
- System: `Pascals-MBP.local`
6+
- Started: `2026-02-22T17:15:48.930Z`
7+
- CWD: `/Users/pascal/Code/business/convx`
8+
9+
## User
10+
11+
_`2026-02-22T17:15:48.930Z`_
12+
13+
i'm noticing missing sessions when exporintg claude. E.g.
14+
15+
/Users/pascal/Code/business/universal-net-calc had a bunch of sessions today but only see 2 when sync'ing . can you check why? see @symlinks directroy for access to the config folders as always
16+
17+
## Agent
18+
19+
_`2026-02-22T17:16:27.123Z`_
20+
21+
Found the bug. The `sessions-index.json` only has entries up to 2026-01-31, but many newer `.jsonl` files exist on disk that aren't listed in it. The `discover_files` method stops at the index when it exists — so new sessions created after the last index write are silently skipped.
22+
23+
The fix: after processing the index, also pick up any `.jsonl` files on disk that aren't already included.
24+
25+
## Agent
26+
27+
_`2026-02-22T17:16:36.548Z`_
28+
29+
The root cause: `sessions-index.json` hadn't been updated since 2026-01-31, so all the new sessions you created today were on disk but invisible to the index-based discovery path.
30+
31+
The fix adds a fallback glob after processing the index: any `.jsonl` files in the project directory whose stem isn't already in `indexed_sids` get appended to the discovered paths. This is the same logic that was already used when no index exists — now it runs in both cases.
32+
33+
## User
34+
35+
_`2026-02-22T17:19:17.069Z`_
36+
37+
great can you push that to a new version so we can use it via uvx in other folders? Btw I noticed the easiest way to use this is `uvx --from convx-ai convx sync` maybe worth adding a `tldr` in the readme on this
38+
39+
## Agent
40+
41+
_`2026-02-22T17:19:45.708Z`_
42+
43+
Now push to PyPI:
44+
45+
## Agent
46+
47+
_`2026-02-22T17:19:51.795Z`_
48+
49+
Needs your PyPI credentials. Run this with your token:
50+
51+
```bash
52+
uv publish --token pypi-<your-token>
53+
```
54+
55+
Or if you have it set via `PYPI_TOKEN` / `UV_PUBLISH_TOKEN` env var:
56+
57+
```bash
58+
UV_PUBLISH_TOKEN=pypi-... uv publish
59+
```
60+
61+
Everything else is done — committed, pushed to GitHub, built successfully as `0.2.2`. Just needs the auth to upload to PyPI.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"child_sessions": [],
3+
"cwd": "/Users/pascal/Code/business/convx",
4+
"messages": [
5+
{
6+
"kind": "user",
7+
"role": "user",
8+
"text": "if I run the search in the TUI, how can I make it match exact strings?",
9+
"timestamp": "2026-02-23T13:41:09.903Z"
10+
},
11+
{
12+
"kind": "thinking",
13+
"role": "reasoning",
14+
"text": "The user is asking about searching in a TUI (Terminal User Interface). This could be about various TUI tools. Let me think about what TUI they might be using in this project context. Looking at the codebase, convx is a CLI tool. They might be asking about searching in general terminal tools like `less`, `vim`, `fzf`, or some other TUI.\n\nWithout more context, they could be asking about:\n1. A TUI they're running (like `lazygit`, `htop`, etc.)\n2. The convx TUI if it has one\n\nLet me check if convx has a TUI component.",
15+
"timestamp": "2026-02-23T13:41:15.866Z"
16+
},
17+
{
18+
"kind": "assistant",
19+
"role": "assistant",
20+
"text": "Could you clarify which TUI you're referring to? For example, are you asking about a specific tool like `fzf`, `lazygit`, `less`, or something else? Or does `convx` have a TUI component you're working with?",
21+
"timestamp": "2026-02-23T13:41:16.751Z"
22+
}
23+
],
24+
"session_id": "31189939-7797-48da-aad7-26987e54342c",
25+
"session_key": "claude:31189939-7797-48da-aad7-26987e54342c",
26+
"source_path": "/Users/pascal/.claude/projects/-Users-pascal-Code-business-convx/31189939-7797-48da-aad7-26987e54342c.jsonl",
27+
"source_system": "claude",
28+
"started_at": "2026-02-23T13:41:09.903Z",
29+
"summary": null,
30+
"system_name": "Pascals-MBP.local",
31+
"user": "pascal"
32+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Conversation 31189939-7797-48da-aad7-26987e54342c
2+
3+
- Source: `claude`
4+
- User: `pascal`
5+
- System: `Pascals-MBP.local`
6+
- Started: `2026-02-23T13:41:09.903Z`
7+
- CWD: `/Users/pascal/Code/business/convx`
8+
9+
## User
10+
11+
_`2026-02-23T13:41:09.903Z`_
12+
13+
if I run the search in the TUI, how can I make it match exact strings?
14+
15+
## Agent
16+
17+
_`2026-02-23T13:41:16.751Z`_
18+
19+
Could you clarify which TUI you're referring to? For example, are you asking about a specific tool like `fzf`, `lazygit`, `less`, or something else? Or does `convx` have a TUI component you're working with?

0 commit comments

Comments
 (0)