Support omp (oh-my-pi) sessions: history import and host detection
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
- #175 di @talbananaz — chiusa senza merge
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- python
- Ambito
- backend, developer-experience
Direzione di ricerca
Read trace/pi.py and plugin/hosts.py, then inspect the existing Pi host history and detection paths. The issue names omp's session directory and log differences, but host detection still needs a discriminator from omp's hook environment. A linked pull request is already open; completion would include importing converted sessions with source mtimes and tests for title-prefixed logs and ignored non-message entries.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem. Running under omp (it loads Claude Code plugins and sets CLAUDE_PLUGIN_ROOT), the plugin reports host claude and te history import finds nothing: ClaudeCode.history() only reads ~/.claude/projects, while omp keeps sessions in ~/.omp/agent/sessions/<cwd-folder>/<timestamp>_<id>.jsonl.
The omp log is Pi-style (tree of id/parentId entries, toolCall/toolResult, same usage fields), with two differences:
- the first line is
{"type":"title",...}, sopi_session_header(which only checks entry 0) returns{}; - extra entry types (
custom,custom_message,developer,credential_pin,model_change, ...) that must be ignored.
Proposal.
trace/pi.py: makepi_session_headerscan the first few entries fortype == "session"; havepi_session_to_claudewritetimestampandcwdon user lines (needed byclaude_log_head/ history import).plugin/hosts.py: addOmp(Pi)withkeeps_history = Trueand ahistory()that lists omp's session dir, converting each log withpi_session_to_claudeinto a cache understate_root()(keep the source mtime so the "recent"/"too_old" filters work). Register inHOSTS; addompto--host.- Host detection: pick
omprather thanclaudewhen running under omp (needs a discriminator from omp's hook env; I haven't confirmed which var). - Tests: fixture omp log starting with a
titleline; assert history lists it andpi_prompt_countignores non-message entries.
Verified locally with a minimal patch of 1 + a history() hook on ClaudeCode: te history import --dry-run went from nothing to "2 earlier session(s) would be read", and te status showed +2 from earlier history, 44 prompts. Happy to send a PR for 1, 2, 4 if the approach is acceptable; 3 needs maintainer input.
- Lingua principale
- Python
- Stelle
- 5.6k
- Fork
- 344
- Merge medio
- 14h 41m
- PR unite (30g)
- 54
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di microsoft/TokenEconomizer
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
microsoft/TokenEconomizer#193 ·
I maintainer di solito rispondono entro 1 giorno
-
pricing: Claude's 1-hour cache writes are priced at 1.25x, but billed at 2xForse già presa @anascherif l’ha presa oggi. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 25/100
microsoft/TokenEconomizer#191 ·
I maintainer di solito rispondono entro 1 giorno
-
trace: Claude Code's `<synthetic>` notices count as requests and can make a Claude session price on the fallback curveForse già presa @1AbdullahButt l’ha presa 1 giorno fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 20/100
microsoft/TokenEconomizer#189 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
microsoft/TokenEconomizer#186 ·
I maintainer di solito rispondono entro 1 giorno
-
plugin: the agent-output readers crash on a JSON line that is not an objectForse già presa @rahul05ranjan l’ha presa 1 giorno fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 25/100
microsoft/TokenEconomizer#182 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di microsoft/TokenEconomizer
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Treat corrupt-shape state files as missing in `load_state`Forse già presa @Qrytics l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
OvertureMaps/overturemaps-py#175 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
awslabs/visual-asset-management-system#1278 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
aws-samples/sample-per-model-bedrock#835 ·
I maintainer di solito rispondono entro 1 giorno