refactor: summarize memory (#1508)

This commit is contained in:
yetone
2025-03-07 00:12:57 +08:00
committed by GitHub
parent 2b0e7e09ae
commit 8620ea3e12
18 changed files with 434 additions and 217 deletions

View File

@@ -33,6 +33,7 @@ struct TemplateContext {
diagnostics: Option<String>,
system_info: Option<String>,
model_name: Option<String>,
memory: Option<String>,
}
// Given the file name registered after add, the context table in Lua, resulted in a formatted
@@ -58,6 +59,7 @@ fn render(state: &State, template: &str, context: TemplateContext) -> LuaResult<
diagnostics => context.diagnostics,
system_info => context.system_info,
model_name => context.model_name,
memory => context.memory,
})
.map_err(LuaError::external)
.unwrap())