mirror of
https://github.com/Direct-Dev-Ru/go-lcg.git
synced 2025-11-16 01:29:55 +00:00
mobile version styled -ready for new version 2.0.1
This commit is contained in:
56
serve/debug.go
Normal file
56
serve/debug.go
Normal file
@@ -0,0 +1,56 @@
|
||||
package serve
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/direct-dev-ru/linux-command-gpt/config"
|
||||
)
|
||||
|
||||
// PrintWebDebugInfo выводит отладочную информацию для веб-запросов
|
||||
func PrintWebDebugInfo(operation, prompt, systemPrompt, model string, timeout int) {
|
||||
if !config.AppConfig.MainFlags.Debug {
|
||||
return
|
||||
}
|
||||
|
||||
fmt.Printf("\n🔍 DEBUG WEB %s:\n", operation)
|
||||
fmt.Printf("💬 Запрос: %s\n", prompt)
|
||||
fmt.Printf("🤖 Системный промпт: %s\n", systemPrompt)
|
||||
fmt.Printf("⏱️ Таймаут: %d сек\n", timeout)
|
||||
fmt.Printf("🌐 Провайдер: %s\n", config.AppConfig.ProviderType)
|
||||
fmt.Printf("🏠 Хост: %s\n", config.AppConfig.Host)
|
||||
fmt.Printf("🧠 Модель: %s\n", model)
|
||||
fmt.Printf("📝 История: %t\n", !config.AppConfig.MainFlags.NoHistory)
|
||||
fmt.Printf("────────────────────────────────────────\n")
|
||||
}
|
||||
|
||||
// PrintWebVerboseDebugInfo выводит отладочную информацию для verbose запросов
|
||||
func PrintWebVerboseDebugInfo(operation, prompt, verbosePrompt, model string, level int, timeout int) {
|
||||
if !config.AppConfig.MainFlags.Debug {
|
||||
return
|
||||
}
|
||||
|
||||
fmt.Printf("\n🔍 DEBUG WEB %s (v%d):\n", operation, level)
|
||||
fmt.Printf("💬 Запрос: %s\n", prompt)
|
||||
fmt.Printf("📝 Системный промпт подробности:\n%s\n", verbosePrompt)
|
||||
fmt.Printf("⏱️ Таймаут: %d сек\n", timeout)
|
||||
fmt.Printf("🌐 Провайдер: %s\n", config.AppConfig.ProviderType)
|
||||
fmt.Printf("🏠 Хост: %s\n", config.AppConfig.Host)
|
||||
fmt.Printf("🧠 Модель: %s\n", model)
|
||||
fmt.Printf("🎯 Уровень подробности: %d\n", level)
|
||||
fmt.Printf("────────────────────────────────────────\n")
|
||||
}
|
||||
|
||||
// PrintWebSaveDebugInfo выводит отладочную информацию для сохранения
|
||||
func PrintWebSaveDebugInfo(operation, prompt, command, explanation, model, file string) {
|
||||
if !config.AppConfig.MainFlags.Debug {
|
||||
return
|
||||
}
|
||||
|
||||
fmt.Printf("\n🔍 DEBUG WEB %s:\n", operation)
|
||||
fmt.Printf("💬 Запрос: %s\n", prompt)
|
||||
fmt.Printf("⚡ Команда: %s\n", command)
|
||||
fmt.Printf("📖 Объяснение: %s\n", explanation)
|
||||
fmt.Printf("🧠 Модель: %s\n", model)
|
||||
fmt.Printf("📁 Файл: %s\n", file)
|
||||
fmt.Printf("────────────────────────────────────────\n")
|
||||
}
|
||||
Reference in New Issue
Block a user