Skip to content
pi-c Artifact [0f3b6627f6]
Login

Artifact [0f3b6627f6]

Artifact 0f3b6627f606d6f7a3710ba5bea6c67cea214997077b57fe0100d15f54634e27:


Updating a journal: pic doctor

Each workspace keeps its conversations in a journal, .pic/journal.sqlite. A newer pic sometimes changes how the journal is laid out, and updates it the first time it opens it. It can only do that while no other pic has the journal open, so an older pic still running in the workspace, a pic remote started before you installed the newer pic, or a terminal pic left open, is in the way.

Most of the time nothing needs doing. pic remote and a terminal pic's follower of a conversation let go of the journal when a newer pic asks, and the update goes ahead. When something else keeps it, the error names each process: its pid, what it is and since when, and the command that ends it.

pic doctor fixes it in one step. Run in the workspace, it:

It never stops itself or the process that started it. pic doctor --json prints one line, {"type":"doctor","ok":BOOL,"state":STATE,"message":TEXT}, with STATE one of none, current, updated, newer, blocked and damaged.

pic remote updates a workspace an older pic last used by itself, without stopping anything: it waits for an older pic that has it open to close; see remote control.

If pic remote was one of the processes stopped, it starts again by itself when it was installed to start at login (pic remote install); otherwise turn it on again with /rc or pic remote.