MCPcopy Create free account
hub / github.com/aiprodcoder/MIXAPI / isCodeContent

Function isCodeContent

relay/relay-text.go:70–89  ·  view source on GitHub ↗

检查是否为代码类内容

(content string)

Source from the content-addressed store, hash-verified

68
69// 检查是否为代码类内容
70func isCodeContent(content string) bool {
71 // 定义代码类关键词
72 codeKeywords := []string{
73 "VSCode Open Tabs",
74 "Current Time",
75 "Current Cost",
76 "Current Mode",
77 "REMINDERS",
78 "VSCode Visible Files",
79 }
80
81 // 检查是否包含代码类关键词
82 for _, keyword := range codeKeywords {
83 if strings.Contains(content, keyword) {
84 return true
85 }
86 }
87
88 return false
89}
90
91// 过滤并只保留汉字内容
92func filterChineseContent(content string) string {

Callers 1

Calls 1

ContainsMethod · 0.80

Tested by

no test coverage detected