mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-11-15 02:49:33 +01:00
fix(#567): separate refusal messages for the cases folder and a direct child
The one message read "That folder is in the cases folder (...), where it is already listed as a case" for the cases folder itself too, which is not in itself and is never listed, and "already listed" is not true for a direct child that does not exist yet. Two messages now, both still pointing at plain Create New. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
9722c5bafe
commit
af52de4d05
2 files changed
+10
-2
No files matched your search
@@ -105,8 +105,11 @@ export function blockedReason(
|
||||
// perfectly good linked case: with CODEMAN_CASES_PATH pointing at a broad root such as /mnt/user/Scripts,
|
||||
// refusing everything below it blocked most of the tree.
|
||||
for (const dir of ctx.casesDirs ?? []) {
|
||||
if (absPath === dir || dirname(absPath) === dir) {
|
||||
return `That folder is in the cases folder (${dir}), where it is already listed as a case; create it there with plain Create New (no custom folder)`;
|
||||
if (absPath === dir) {
|
||||
return `That is the cases folder itself (${dir}); create a case inside it with plain Create New (no custom folder)`;
|
||||
}
|
||||
if (dirname(absPath) === dir) {
|
||||
return `That folder is directly in the cases folder (${dir}), where it is listed as a local case; create it there with plain Create New (no custom folder)`;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
||||
Reference in new issue
Block a user