forge-cw 0.1.10 → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cw/.bundle.json +1 -1
- package/cw/cw +15 -11
- package/package.json +1 -1
package/cw/.bundle.json
CHANGED
package/cw/cw
CHANGED
|
@@ -2991,19 +2991,23 @@ $(cat "$wf_file")"
|
|
|
2991
2991
|
fi
|
|
2992
2992
|
fi
|
|
2993
2993
|
|
|
2994
|
-
# ──
|
|
2995
|
-
local
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
2994
|
+
# ── Work context (init): global first, then the account's ────────
|
|
2995
|
+
local init_tpl init_ctx
|
|
2996
|
+
for init_tpl in "$CW_HOME/templates/work_init.md" "$(_account_root "$account")/templates/work_init.md"; do
|
|
2997
|
+
[[ -f "$init_tpl" ]] || continue
|
|
2998
|
+
init_ctx=$(cat "$init_tpl")
|
|
2999
|
+
init_ctx="${init_ctx//\$\{task\}/$task}"
|
|
3000
|
+
init_ctx="${init_ctx//\$\{project\}/$name}"
|
|
3001
|
+
init_ctx="${init_ctx//\$\{branch\}/$task}"
|
|
3002
3002
|
init_prompt="$init_prompt
|
|
3003
3003
|
|
|
3004
|
-
$
|
|
3005
|
-
|
|
3006
|
-
|
|
3004
|
+
$init_ctx"
|
|
3005
|
+
if [[ "$init_tpl" == "$CW_HOME/templates/work_init.md" ]]; then
|
|
3006
|
+
_dim " Work context: global"
|
|
3007
|
+
else
|
|
3008
|
+
_dim " Account context: $account"
|
|
3009
|
+
fi
|
|
3010
|
+
done
|
|
3007
3011
|
|
|
3008
3012
|
# Exclude .tasks from git (but DON'T pre-create the task dir — worktree needs it empty)
|
|
3009
3013
|
mkdir -p "$path/.tasks"
|