ai_scheduler/tmp_show_prompt.go

27 lines
594 B
Go

//go:build ignore
package main
import (
"fmt"
"os"
"strings"
)
func main() {
f := "internal/biz/advice_chat.go"
b, _ := os.ReadFile(f)
lines := strings.Split(string(b), "\n")
// Show taskPrompt and buildChatPromptResponse
for i, line := range lines {
if strings.Contains(line, "func (a *AdviceChatBiz) taskPrompt") ||
strings.Contains(line, "func (a *AdviceChatBiz) buildChatPromptResponse") {
for j := i; j < i+25 && j < len(lines); j++ {
visible := strings.ReplaceAll(lines[j], "\t", "→")
fmt.Printf("L%d: %s\n", j+1, visible)
}
fmt.Println("---")
}
}
}