Repository navigation
feat(agent): switches for the ChatGPT and Claude app sources - #204
IgorMGitHub wants to merge 1 commit into
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
|
|
||
| /// The app keeps its own data under the name of Codex Desktop, which it is built on; the | ||
| /// Codex command line tool has no such folder. | ||
| fn installed(&self, home: &Path) -> bool { |
There was a problem hiding this comment.
Question: The "installed" check looks for ~/Library/Application Support/Codex, which the comment says is the Codex Desktop folder. If someone has only the Codex desktop app and not the ChatGPT app, Status would not show "not installed" for ChatGPT. Was this folder checked on a Mac that has the ChatGPT app and one that has only Codex Desktop, and is it the right marker for ChatGPT alone?
There was a problem hiding this comment.
Checked on this Mac: the only OpenAI app is /Applications/ChatGPT.app, bundle id com.openai.codex. It keeps its data in ~/Library/Application Support/Codex and writes the sessions with originator: "Codex Desktop". So ChatGPT and Codex Desktop are one app, and the folder marks the app that writes the files this source reads. I could not check a Mac with the older ChatGPT app (com.openai.chat) or an older Codex Desktop build. The doc comment now names the bundle (3910a2d).
|
|
||
| #[test] | ||
| fn the_erase_command_takes_the_claude_app_sessions_and_a_switch_on_collects_them_again() { | ||
| fn the_erase_command_takes_the_sessions_of_both_apps_and_a_switch_on_collects_them_again() { |
There was a problem hiding this comment.
Question: Codex and ChatGPT read one folder, and the new switches let one be on while the other is off. Is there a test where the follower stores Codex chats while the ChatGPT switch is off (and the reverse), and where chatgpt off drops the sources from a backfill count? The settings tests check collects per tool and the erase test only turns off collection as a whole, so a wrong switch name in the real follower setup would not turn a test red.
There was a problem hiding this comment.
There was no such test. Added two (3910a2d). codex_and_chatgpt_each_follow_their_own_switch_although_they_share_a_folder runs the real Codex and ChatGPT readers over one folder, with the follower switched by settings.collects as in main.rs. With ChatGPT off, Codex is stored and ChatGPT is not, and Status shows ChatGPT off. Then the reverse. The backfill test now has a ChatGPT prompt: codex:false keeps it in the count, and chatgpt:false takes it out. Swapping chatgpt and codex in collects, or making the follower ask for codex for every file or tool, turns these tests red.
The two app sources get a switch of their own, on by default. A settings file written before reads the ChatGPT switch as its Codex value, so a person who turned Codex off does not start collecting ChatGPT chats, and the Claude app switch as on. Status shows the ChatGPT app as not installed when its data folder is missing, and the erasure test covers both apps. Signed-off-by: Igor Makarov <igor.makarov@constructor.tech>
96802eb to
3910a2d
Compare
What changes
The two app sources get what the other tools have: a switch of their own, "not installed" in Status, and a test that "Delete everything" removes them.
collection.chatgptandcollection.claude_appare new switches, on by default. A settings file withoutchatgptreads it as itscodexvalue, so a person who turned Codex off does not start collecting ChatGPT chats; a file withoutclaude_appreads it as on. A switch that is not a boolean (nulltoo) makes the file unreadable, which turns collection off, as for the other switches.settings-getanswers both switches,settings-settakes both, andtools_offnames each source whose switch is off.not_installedfor the ChatGPT app when~/Library/Application Support/Codexis not there (the app keeps its data under the name of Codex Desktop, which it is built on). The Claude app already does.For the Settings page: the field names are
collection.chatgptandcollection.claude_app, insettings-getandsettings-set; a source without its app has"not_installed": trueinstatus.Known limits
Verification
cargo fmt --check,cargo clippy --workspace --all-targets --locked -- -D warnings,pre-commiton the changed files: clean.cargo test --workspace --locked --no-fail-fast(shortTMPDIR): all suites pass.chatgptfromcodex, the default ofclaude_app, each switch on its own, both switches saved and answered,nullread as unreadable,not_installedfor a tool, the erasure of both apps.