feat(chat): per-chat permission modes for Claude, Codex and OpenCode
This commit is contained in:
@@ -45,6 +45,8 @@ type Chat struct {
|
||||
mu sync.Mutex
|
||||
usageMu sync.Mutex
|
||||
usageModels map[string]usageModelCache
|
||||
modeMu sync.Mutex
|
||||
agents map[string]string
|
||||
}
|
||||
|
||||
// NewChat brokers chat for one owned OpenCode endpoint. The connection must be
|
||||
@@ -131,6 +133,9 @@ func (c *Chat) PromptWithMessageIDFiles(ctx context.Context, id, text, messageID
|
||||
if messageID != "" {
|
||||
body["id"] = messageID
|
||||
}
|
||||
if agent := c.agentFor(id); agent != "" {
|
||||
body["agent"] = agent
|
||||
}
|
||||
if len(files) > 0 {
|
||||
attachments := make([]map[string]string, 0, len(files))
|
||||
for _, file := range files {
|
||||
|
||||
Reference in New Issue
Block a user