fix: v0.2.1 — chunked ChatGPT cookies and Claude project path

- Support __Secure-next-auth.session-token.0/.1 split cookies; ChatGPT
  now issues tokens that exceed the 4KB per-cookie limit and must be
  sent as two named chunks or the auth endpoint returns no accessToken.
  Add CHATGPT_SESSION_TOKEN_1 env var; update auth wizard instructions.

- Fix Claude conversations exported to wrong directory when project name
  is present in the listing but absent from the detail endpoint response.
  Explicitly propagate "project" alongside _-prefixed annotation keys.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-13 22:32:14 -04:00
co-authored by Claude Sonnet 4.6
parent 4ccd918eb1
commit 19bfdaecbe
5 changed files with 49 additions and 15 deletions
+3
View File
@@ -28,6 +28,7 @@ class ConfigError(Exception):
@dataclass
class Config:
chatgpt_session_token: str | None
chatgpt_session_token_1: str | None
claude_session_key: str | None
export_dir: Path
output_structure: str
@@ -55,6 +56,7 @@ def load_config() -> Config:
load_dotenv(override=False)
chatgpt_token = os.getenv("CHATGPT_SESSION_TOKEN", "").strip() or None
chatgpt_token_1 = os.getenv("CHATGPT_SESSION_TOKEN_1", "").strip() or None
claude_key = os.getenv("CLAUDE_SESSION_KEY", "").strip() or None
export_dir = Path(os.getenv("EXPORT_DIR", "./exports")).expanduser()
output_structure = os.getenv("OUTPUT_STRUCTURE", "provider/project/year").strip()
@@ -127,6 +129,7 @@ def load_config() -> Config:
config = Config(
chatgpt_session_token=chatgpt_token,
chatgpt_session_token_1=chatgpt_token_1,
claude_session_key=claude_key,
export_dir=export_dir,
output_structure=output_structure,