mirror of
https://github.com/R0m1k3/Loki.git
synced 2026-10-24 07:28:13 +02:00
v0.2.10 : mode agent unifie (un seul toggle = shell + skills) + jeu de mot 'ajean' + refonte du header (pastille d'etat, preset, espacements)
This commit is contained in:
1 parent
175bbd34d9
commit
d3a2f1c428
11 files changed
+199
-207
No files matched your search
@@ -87,14 +87,15 @@ func runShellTool() Tool {
|
||||
// what the model can do for this conversation, instead of always inheriting the
|
||||
// machine's global config. Use globalCaps() to fall back to the global config.
|
||||
type Caps struct {
|
||||
Tools bool
|
||||
Skills bool
|
||||
// Agent = mode agent actif : un seul interrupteur qui débloque TOUS les
|
||||
// outils de l'IA (shell + skills). Un skill est un outil comme un autre.
|
||||
Agent bool
|
||||
}
|
||||
|
||||
// globalCaps reads the machine-wide config — the default when a request doesn't
|
||||
// specify its own capabilities.
|
||||
func globalCaps() Caps {
|
||||
return Caps{Tools: toolsEnabled(), Skills: skillsEnabled()}
|
||||
return Caps{Agent: agentEnabled()}
|
||||
}
|
||||
|
||||
// InjectSkills prepends context system messages to msgs: the decisive-agent
|
||||
@@ -130,11 +131,8 @@ func InjectSkills(msgs []Message, caps Caps) []Message {
|
||||
// EnabledTools returns the tools to advertise on the next inference call.
|
||||
func EnabledTools(caps Caps) []Tool {
|
||||
tools := []Tool{}
|
||||
if caps.Skills {
|
||||
tools = append(tools, skillTool())
|
||||
}
|
||||
if caps.Tools {
|
||||
tools = append(tools, runShellTool())
|
||||
if caps.Agent {
|
||||
tools = append(tools, skillTool(), runShellTool())
|
||||
}
|
||||
return tools
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user