检查是否为代码类内容
(content string)
| 68 | |
| 69 | // 检查是否为代码类内容 |
| 70 | func 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 | // 过滤并只保留汉字内容 |
| 92 | func filterChineseContent(content string) string { |
no test coverage detected