| ai_regenerate_context | R Documentation |
Updates only the sections marked with <!-- @framework:regenerate --> in an
existing AI context file, preserving user customizations in unmarked sections.
ai_regenerate_context(project_path = ".", sections = NULL, ai_file = NULL)
project_path |
Path to the project directory |
sections |
Which sections to regenerate. NULL = all regeneratable sections. Options: "environment", "packages", "data", "functions" |
ai_file |
Name of the AI context file (default: from settings or "CLAUDE.md") |
Invisible TRUE on success
if (file.exists("CLAUDE.md")) {
# Regenerate all dynamic sections
ai_regenerate_context()
# Regenerate only packages section
ai_regenerate_context(sections = "packages")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.