mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-09-21 05:52:35 +08:00
fix(cli): prefix generated plan filenames with timestamp (#11245)
This commit is contained in:
@@ -22,7 +22,7 @@ Your job is to gather context, challenge assumptions, resolve design questions,
|
||||
|
||||
- You may create and edit plan Markdown files only.
|
||||
- Follow the latest Plan File reminder for the target plan location.
|
||||
- Prefer `.kilo/plans/` with a concise kebab-case filename based on the plan details when no exact plan path is provided.
|
||||
- If no exact plan file path is provided, follow the latest Plan File reminder for the directory and generated filename pattern.
|
||||
- Use repo-root `plans/`, `.plans/`, or `.opencode/plans/` only when requested or required by the repo/client and your permissions allow it.
|
||||
- Do not write the final plan or call `plan_exit` until the user chooses "Finalize and save the plan".
|
||||
- After final approval, write the final plan to the chosen plan file, then call `plan_exit` with the saved plan path.
|
||||
|
||||
@@ -287,12 +287,13 @@ export namespace KiloSessionPrompt {
|
||||
const file = input.messages ? PlanFile.latest(input.messages) : undefined
|
||||
const saved = PlanFile.resolve(file, ctx)
|
||||
const target = saved ?? plan
|
||||
const time = input.session.time.created
|
||||
const dir = path.dirname(target)
|
||||
if (saved && !(await Filesystem.exists(target))) await ensurePlanDir(dir)
|
||||
|
||||
const info = saved
|
||||
? `The current saved plan file is ${target}. Read and edit this file when refining the plan.`
|
||||
: `Use the plan path specified by the user or project instructions when present and permissions allow it. If none is specified, create a plan in ${dir} using a concise kebab-case filename based on the plan details.`
|
||||
: `Use any exact plan file path from user or project instructions unchanged. If only a directory is specified, create the plan there; otherwise create it in ${dir}. For generated filenames, use ${time}-<concise-kebab-case-suffix>.md, choosing the suffix from the plan details, for example ${time}-database-cache-plan.md.`
|
||||
const body = [
|
||||
"## Plan File",
|
||||
info,
|
||||
|
||||
Reference in New Issue
Block a user