feat(kiro): 代码优化重构 + OpenAI翻译器实现

This commit is contained in:
Ravens2121
2025-12-14 06:58:50 +08:00
parent 1ea0cff3a4
commit 01cf221167
19 changed files with 3898 additions and 3293 deletions
+16
View File
@@ -0,0 +1,16 @@
// Package common provides shared constants and utilities for Kiro translator.
package common
// GetString safely extracts a string from a map.
// Returns empty string if the key doesn't exist or the value is not a string.
func GetString(m map[string]interface{}, key string) string {
if v, ok := m[key].(string); ok {
return v
}
return ""
}
// GetStringValue is an alias for GetString for backward compatibility.
func GetStringValue(m map[string]interface{}, key string) string {
return GetString(m, key)
}