feat(core): honor default session models (#30982)
This commit is contained in:
parent
f26a9e8856
commit
d2204e0ff5
8 changed files with 93 additions and 15 deletions
|
|
@ -58,8 +58,7 @@ export const Plugin = PluginV2.define({
|
|||
|
||||
yield* agent.update((editor) => {
|
||||
const global = documents.flatMap((document) => document.info.permissions ?? [])
|
||||
const configuredDefault = documents.findLast((document) => document.info.default_agent !== undefined)?.info
|
||||
.default_agent
|
||||
const configuredDefault = Config.latest(documents, "default_agent")
|
||||
if (configuredDefault !== undefined) editor.default(AgentV2.ID.make(configuredDefault))
|
||||
for (const current of editor.list()) {
|
||||
editor.update(current.id, (agent) => agent.permissions.push(...global))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue