style: fix goimports formatting across codebase
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
6fae0e2ca7
commit
c267db36a6
9 changed files with 17 additions and 17 deletions
|
|
@ -20,7 +20,6 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/chzyer/readline"
|
|
||||||
"github.com/KarakuriAgent/clawdroid/pkg/agent"
|
"github.com/KarakuriAgent/clawdroid/pkg/agent"
|
||||||
"github.com/KarakuriAgent/clawdroid/pkg/bus"
|
"github.com/KarakuriAgent/clawdroid/pkg/bus"
|
||||||
"github.com/KarakuriAgent/clawdroid/pkg/channels"
|
"github.com/KarakuriAgent/clawdroid/pkg/channels"
|
||||||
|
|
@ -31,6 +30,7 @@ import (
|
||||||
"github.com/KarakuriAgent/clawdroid/pkg/providers"
|
"github.com/KarakuriAgent/clawdroid/pkg/providers"
|
||||||
"github.com/KarakuriAgent/clawdroid/pkg/skills"
|
"github.com/KarakuriAgent/clawdroid/pkg/skills"
|
||||||
"github.com/KarakuriAgent/clawdroid/pkg/tools"
|
"github.com/KarakuriAgent/clawdroid/pkg/tools"
|
||||||
|
"github.com/chzyer/readline"
|
||||||
)
|
)
|
||||||
|
|
||||||
//go:generate cp -r ../../workspace .
|
//go:generate cp -r ../../workspace .
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ type AgentLoop struct {
|
||||||
model string
|
model string
|
||||||
maxTokens int // Maximum tokens for API response
|
maxTokens int // Maximum tokens for API response
|
||||||
temperature float64 // Temperature for LLM (0 = not sent)
|
temperature float64 // Temperature for LLM (0 = not sent)
|
||||||
contextWindow int // Maximum context window size in tokens (for summarization)
|
contextWindow int // Maximum context window size in tokens (for summarization)
|
||||||
maxIterations int
|
maxIterations int
|
||||||
sessions *session.SessionManager
|
sessions *session.SessionManager
|
||||||
state *state.Manager
|
state *state.Manager
|
||||||
|
|
|
||||||
|
|
@ -7,11 +7,11 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/bwmarrin/discordgo"
|
|
||||||
"github.com/KarakuriAgent/clawdroid/pkg/bus"
|
"github.com/KarakuriAgent/clawdroid/pkg/bus"
|
||||||
"github.com/KarakuriAgent/clawdroid/pkg/config"
|
"github.com/KarakuriAgent/clawdroid/pkg/config"
|
||||||
"github.com/KarakuriAgent/clawdroid/pkg/logger"
|
"github.com/KarakuriAgent/clawdroid/pkg/logger"
|
||||||
"github.com/KarakuriAgent/clawdroid/pkg/utils"
|
"github.com/KarakuriAgent/clawdroid/pkg/utils"
|
||||||
|
"github.com/bwmarrin/discordgo"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
@ -20,9 +20,9 @@ const (
|
||||||
|
|
||||||
type DiscordChannel struct {
|
type DiscordChannel struct {
|
||||||
*BaseChannel
|
*BaseChannel
|
||||||
session *discordgo.Session
|
session *discordgo.Session
|
||||||
config config.DiscordConfig
|
config config.DiscordConfig
|
||||||
ctx context.Context
|
ctx context.Context
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewDiscordChannel(cfg config.DiscordConfig, bus *bus.MessageBus) (*DiscordChannel, error) {
|
func NewDiscordChannel(cfg config.DiscordConfig, bus *bus.MessageBus) (*DiscordChannel, error) {
|
||||||
|
|
@ -36,8 +36,8 @@ func NewDiscordChannel(cfg config.DiscordConfig, bus *bus.MessageBus) (*DiscordC
|
||||||
return &DiscordChannel{
|
return &DiscordChannel{
|
||||||
BaseChannel: base,
|
BaseChannel: base,
|
||||||
session: session,
|
session: session,
|
||||||
config: cfg,
|
config: cfg,
|
||||||
ctx: context.Background(),
|
ctx: context.Background(),
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,8 +22,8 @@ type SlackChannel struct {
|
||||||
config config.SlackConfig
|
config config.SlackConfig
|
||||||
api *slack.Client
|
api *slack.Client
|
||||||
socketClient *socketmode.Client
|
socketClient *socketmode.Client
|
||||||
botUserID string
|
botUserID string
|
||||||
ctx context.Context
|
ctx context.Context
|
||||||
cancel context.CancelFunc
|
cancel context.CancelFunc
|
||||||
pendingAcks sync.Map
|
pendingAcks sync.Map
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,8 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/mymmrac/telego"
|
|
||||||
"github.com/KarakuriAgent/clawdroid/pkg/config"
|
"github.com/KarakuriAgent/clawdroid/pkg/config"
|
||||||
|
"github.com/mymmrac/telego"
|
||||||
)
|
)
|
||||||
|
|
||||||
type TelegramCommander interface {
|
type TelegramCommander interface {
|
||||||
|
|
|
||||||
|
|
@ -7,13 +7,13 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/google/uuid"
|
|
||||||
"github.com/gorilla/websocket"
|
|
||||||
"github.com/KarakuriAgent/clawdroid/pkg/broadcast"
|
"github.com/KarakuriAgent/clawdroid/pkg/broadcast"
|
||||||
"github.com/KarakuriAgent/clawdroid/pkg/bus"
|
"github.com/KarakuriAgent/clawdroid/pkg/bus"
|
||||||
"github.com/KarakuriAgent/clawdroid/pkg/config"
|
"github.com/KarakuriAgent/clawdroid/pkg/config"
|
||||||
"github.com/KarakuriAgent/clawdroid/pkg/logger"
|
"github.com/KarakuriAgent/clawdroid/pkg/logger"
|
||||||
"github.com/KarakuriAgent/clawdroid/pkg/tools"
|
"github.com/KarakuriAgent/clawdroid/pkg/tools"
|
||||||
|
"github.com/google/uuid"
|
||||||
|
"github.com/gorilla/websocket"
|
||||||
)
|
)
|
||||||
|
|
||||||
// wsIncoming is the JSON message sent from APK to clawdroid.
|
// wsIncoming is the JSON message sent from APK to clawdroid.
|
||||||
|
|
|
||||||
|
|
@ -11,9 +11,9 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
sdkmcp "github.com/modelcontextprotocol/go-sdk/mcp"
|
|
||||||
"github.com/KarakuriAgent/clawdroid/pkg/config"
|
"github.com/KarakuriAgent/clawdroid/pkg/config"
|
||||||
"github.com/KarakuriAgent/clawdroid/pkg/logger"
|
"github.com/KarakuriAgent/clawdroid/pkg/logger"
|
||||||
|
sdkmcp "github.com/modelcontextprotocol/go-sdk/mcp"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ServerInstance manages a connected MCP server session.
|
// ServerInstance manages a connected MCP server session.
|
||||||
|
|
|
||||||
|
|
@ -131,7 +131,7 @@ After completing the task, provide a clear summary of what was done.`
|
||||||
Tools: tools,
|
Tools: tools,
|
||||||
MaxIterations: maxIter,
|
MaxIterations: maxIter,
|
||||||
LLMOptions: map[string]any{
|
LLMOptions: map[string]any{
|
||||||
"max_tokens": 4096,
|
"max_tokens": 4096,
|
||||||
},
|
},
|
||||||
}, messages, task.OriginChannel, task.OriginChatID)
|
}, messages, task.OriginChannel, task.OriginChatID)
|
||||||
|
|
||||||
|
|
@ -288,7 +288,7 @@ func (t *SubagentTool) Execute(ctx context.Context, args map[string]interface{})
|
||||||
Tools: tools,
|
Tools: tools,
|
||||||
MaxIterations: maxIter,
|
MaxIterations: maxIter,
|
||||||
LLMOptions: map[string]any{
|
LLMOptions: map[string]any{
|
||||||
"max_tokens": 4096,
|
"max_tokens": 4096,
|
||||||
},
|
},
|
||||||
}, messages, t.originChannel, t.originChatID)
|
}, messages, t.originChannel, t.originChatID)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,8 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/google/uuid"
|
|
||||||
"github.com/KarakuriAgent/clawdroid/pkg/logger"
|
"github.com/KarakuriAgent/clawdroid/pkg/logger"
|
||||||
|
"github.com/google/uuid"
|
||||||
)
|
)
|
||||||
|
|
||||||
const maxImageFileSize = 50 * 1024 * 1024 // 50MB
|
const maxImageFileSize = 50 * 1024 * 1024 // 50MB
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue