wip: logging improvements

This commit is contained in:
adamdottv
2025-05-09 13:37:13 -05:00
parent f41b7bbd0a
commit f100777199
41 changed files with 848 additions and 438 deletions

View File

@@ -9,7 +9,7 @@ import (
"github.com/opencode-ai/opencode/internal/config"
"github.com/opencode-ai/opencode/internal/llm/models"
"github.com/opencode-ai/opencode/internal/logging"
"log/slog"
)
func GetAgentPrompt(agentName config.AgentName, provider models.ModelProvider) string {
@@ -28,7 +28,7 @@ func GetAgentPrompt(agentName config.AgentName, provider models.ModelProvider) s
if agentName == config.AgentCoder || agentName == config.AgentTask {
// Add context from project-specific instruction files if they exist
contextContent := getContextFromPaths()
logging.Debug("Context content", "Context", contextContent)
slog.Debug("Context content", "Context", contextContent)
if contextContent != "" {
return fmt.Sprintf("%s\n\n# Project-Specific Context\n Make sure to follow the instructions in the context below\n%s", basePrompt, contextContent)
}