Skip to content

Refactor session prompt reminders#28082

Open
rekram1-node wants to merge 3 commits into
devfrom
debug-core-loop
Open

Refactor session prompt reminders#28082
rekram1-node wants to merge 3 commits into
devfrom
debug-core-loop

Conversation

@rekram1-node
Copy link
Copy Markdown
Collaborator

Summary

  • Move session prompt reminder injection into session/reminders.ts
  • Keep the core prompt loop focused on loop orchestration while preserving existing reminder behavior

Testing

  • bunx prettier --check src/session/prompt.ts src/session/reminders.ts
  • bun --conditions=browser -e \"await import('./src/session/reminders.ts')\"

@rekram1-node
Copy link
Copy Markdown
Collaborator Author

/review

messageID: userMessage.info.id,
sessionID: userMessage.info.sessionID,
type: "text",
text: PLAN_MODE.replace(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: consider using a replacement callback here. With the string replacement overload, dollar replacement patterns such as $& or $$ in the plan path are interpreted specially, so a workspace path containing those characters can corrupt the injected reminder text compared with the previous template literal behavior. A callback replacement would preserve the path literally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant