mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-11-14 18:39:33 +01:00
fix(story-mode): name the files, say when a repository is new, and when a push stayed on this computer
From review round 9 (a newcomer to the project): - One or two files are named, not counted: "Claude writes .gitignore and saves the work", "Claude changes rename_by_date.sh.", "Claude writes the new files mathx.py and test_mathx.py." Three or more are counted. - The first save in a folder Claude turned into a repository says so: "Claude starts a git repository and saves the work: …". A `git init --bare` (the push target) does not count, nor a folder that already had commits. - A push to a repository in a folder on this computer (`To ./origin.git`) is a copy, not an upload: "then copies it to origin.git, a folder on this computer", and the final chip reads "copied to origin.git". - A tool lookup for plan mode reads "Claude gets ready to plan." Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
a80638308b
commit
70b1ebcc19
16 files changed
+148
-67
No files matched your search
@@ -2544,9 +2544,21 @@ Object.assign(CodemanApp.prototype, {
|
||||
const shipped = page.events.some(
|
||||
(e) => e.ships === 'push' && (e.ok !== false || /\[new branch\]|\S+\.\.\S+\s+\S+\s+->/.test(e.output || ''))
|
||||
);
|
||||
// A push to a folder on this computer (`To ./origin.git`) is a copy: nothing left the machine.
|
||||
const target = /^To (\S+)/m.exec(
|
||||
page.events
|
||||
.filter((e) => e.ships === 'push')
|
||||
.map((e) => e.output || '')
|
||||
.join('\n')
|
||||
)?.[1];
|
||||
const copiedTo =
|
||||
target && (/^file:\/\//.test(target) || !target.includes(':')) ? target.split('/').filter(Boolean).pop() : '';
|
||||
if (commits || shipped)
|
||||
items.push({
|
||||
text: [commits ? `${commits} commit${commits === 1 ? '' : 's'}` : '', shipped ? 'uploaded' : '']
|
||||
text: [
|
||||
commits ? `${commits} commit${commits === 1 ? '' : 's'}` : '',
|
||||
shipped ? (copiedTo ? `copied to ${copiedTo}` : 'uploaded') : '',
|
||||
]
|
||||
.filter(Boolean)
|
||||
.join(', '),
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user