placeholders
This commit is contained in:
parent
04eea10aa5
commit
4ade9ebafe
BIN
mcp/cremote-mcp
BIN
mcp/cremote-mcp
Binary file not shown.
32
mcp/main.go
32
mcp/main.go
|
@ -707,10 +707,38 @@ func main() {
|
|||
Required: []string{},
|
||||
},
|
||||
}, func(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error) {
|
||||
// For now, return a placeholder since we need to implement console logging in daemon
|
||||
// Convert arguments to map
|
||||
params, ok := request.Params.Arguments.(map[string]any)
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("invalid arguments format")
|
||||
}
|
||||
|
||||
tab := getStringParam(params, "tab", cremoteServer.currentTab)
|
||||
clear := getBoolParam(params, "clear", false)
|
||||
|
||||
// Get console logs
|
||||
logs, err := cremoteServer.client.GetConsoleLogs(tab, clear)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to get console logs: %w", err)
|
||||
}
|
||||
|
||||
// Format logs for display
|
||||
var logText string
|
||||
if len(logs) == 0 {
|
||||
logText = "No console logs found."
|
||||
} else {
|
||||
logText = fmt.Sprintf("Found %d console log entries:\n\n", len(logs))
|
||||
for i, log := range logs {
|
||||
level := log["level"].(string)
|
||||
message := log["message"].(string)
|
||||
timestamp := log["timestamp"].(string)
|
||||
logText += fmt.Sprintf("[%d] %s [%s]: %s\n", i+1, timestamp, level, message)
|
||||
}
|
||||
}
|
||||
|
||||
return &mcp.CallToolResult{
|
||||
Content: []mcp.Content{
|
||||
mcp.NewTextContent("Console logging not yet implemented - please use console_command for now"),
|
||||
mcp.NewTextContent(logText),
|
||||
},
|
||||
IsError: false,
|
||||
}, nil
|
||||
|
|
Loading…
Reference in New Issue