031855935d
- Implemented QuickReplySeed structure and seeds for both English and Chinese languages. - Created SkillDefinitionSeed structure with detailed instructions and examples for the "After-sales Escalation" skill in both languages. - Added TagSeed structure and corresponding seeds for categorizing inquiries in English and Chinese. - Refactored skill and tag initialization to utilize the new seed structures, ensuring proper data handling and multilingual support. - Updated tests to verify that English seeds do not contain Chinese text, ensuring data integrity.
50 lines
1.1 KiB
Go
50 lines
1.1 KiB
Go
package seeds
|
|
|
|
import (
|
|
"agent-desk/cmd/testdata/seedlang"
|
|
"agent-desk/internal/pkg/dto"
|
|
"agent-desk/internal/pkg/enums"
|
|
|
|
"github.com/mlogclub/simple/common/jsons"
|
|
)
|
|
|
|
type ChannelSeed struct {
|
|
Name string
|
|
ChannelType string
|
|
ConfigJSON string
|
|
Remark string
|
|
}
|
|
|
|
func ChannelSeeds(lang seedlang.Language) []ChannelSeed {
|
|
if lang == seedlang.English {
|
|
return []ChannelSeed{
|
|
{
|
|
Name: "Website Support",
|
|
ChannelType: enums.ChannelTypeWeb,
|
|
ConfigJSON: jsons.ToJsonStr(dto.WebChannelConfig{
|
|
Title: "Online Support",
|
|
Subtitle: "Powered by AgentDesk",
|
|
ThemeColor: "#2563eb",
|
|
Position: "right",
|
|
Width: "780px",
|
|
}),
|
|
Remark: "Local testdata seed",
|
|
},
|
|
}
|
|
}
|
|
return []ChannelSeed{
|
|
{
|
|
Name: "官网客服",
|
|
ChannelType: enums.ChannelTypeWeb,
|
|
ConfigJSON: jsons.ToJsonStr(dto.WebChannelConfig{
|
|
Title: "在线客服",
|
|
Subtitle: "AgentDesk 提供技术支持",
|
|
ThemeColor: "#2563eb",
|
|
Position: "right",
|
|
Width: "780px",
|
|
}),
|
|
Remark: "Local testdata seed",
|
|
},
|
|
}
|
|
}
|