export const UI_TEXT = {
  appName: "连小新",
  modelFallback: "Qwen Turbo",
  modelNames: {
    "qwen-turbo": "Qwen Turbo"
  } as Record<string, string>,
  modelDesc: {
    "qwen-turbo": "Alibaba Qwen Turbo general assistant model"
  } as Record<string, string>,
  quickActions: ["查活动", "写建言", "发互助", "查积分", "入会流程", "我的报名"],
  quickPrompts: ["最近有什么活动适合我？", "帮我写一篇建言献策", "帮我发布一条企业互助", "我想查询我的积分"],
  fallbackPrompts: ["活动推荐", "新闻资讯", "学习园地", "建言献策", "调查问卷", "数据查询"],
  placeholder: "输入要办理的事，例如“我要报名活动”",
  heroTitle: "连小新为您服务",
  heroSubtitle: "查活动、写建言、发互助、看积分，都可以从这里开始",
  drawerTitle: "服务记录",
  settingsTitle: "服务设置",
  noConversationSummary: "暂无摘要",
  noMessages: "新的对话已经准备好了，你可以直接开始。",
  loading: "加载中...",
  thinking: "正在思考中...",
  confirm: "确认提交",
  cancel: "取消",
  preview: "查看草稿",
  actionNames: {
    "content.suggestion.submit": "提交建言",
    "activity.create_draft": "创建活动草稿",
    "activity.submit_for_review": "提交活动审核",
    "mutual_aid.post.submit": "提交企业互助",
    "activity.register.submit": "活动报名"
  } as Record<string, string>,
  actionDescriptions: {
    "content.suggestion.submit": "将您的建言内容正式提交到平台",
    "activity.create_draft": "根据您的要求整理活动信息并提交审核",
    "activity.submit_for_review": "将活动草稿提交至管理员审核",
    "mutual_aid.post.submit": "发布您的互助信息到平台",
    "activity.register.submit": "为您报名参加该活动"
  } as Record<string, string>,
  riskLevels: {
    low: "低风险",
    medium: "中风险",
    high: "高风险"
  } as Record<string, string>
};

export const SUGGESTION_KEYWORDS = ["写建言", "建言献策", "我要建言", "提交建言", "帮我写建言"];
export const ACTIVITY_KEYWORDS = ["发活动", "发布活动", "发起活动", "我要发活动", "创建活动"];
export const MUTUAL_AID_KEYWORDS = ["发互助", "发布互助", "发布资源", "发布需求", "互助资源", "互助需求", "企业互助"];
export const ACTIVITY_REGISTER_KEYWORDS = ["报名活动", "帮我报名", "我要报名", "报名这个活动", "参加这个活动", "我要参加活动"];
export const ACTIVITY_LIST_KEYWORDS = ["活动推荐", "推荐活动", "最近有什么活动", "适合我的活动"];
export const LIVE_DRAFT_STORAGE_KEY = "live_agent_draft_state_v1";
export const LIVE_MODEL_STORAGE_KEY = "live_agent_model_state_v1";

export const DRAFT_MAX_AGE_MS = 24 * 60 * 60 * 1000; // 24 hours

/** 意图关键词映射表：意图类型 → 关键词列表 */
export const KEYWORD_PATTERNS: Record<string, string[]> = {
  service_help: ["我的求助", "求助进度", "服务求助", "服务诉求", "我的需求", "处理进度"],
  activity_registered: ["我的报名", "报名记录", "已报名活动", "我报名的活动"],
  survey_history: ["答卷记录", "问卷记录", "我的答卷", "已填问卷"],
  point_history: ["积分记录", "积分历史", "积分明细"],
  learning_records: ["学习记录", "学习历史"],
  browsing_history: ["浏览历史", "浏览记录", "阅读历史", "阅读记录"],
  social_card: ["社交名片", "我的名片"],
  policy_inquiry: ["政策", "统战", "条例", "意见", "法规"],
  point_query: ["积分", "分数", "等级", "权益"],
  performance_query: ["履职", "考核", "评价"],
  review_inquiry: ["审批", "待审", "审核"],
  portal_guide: ["入会", "加入", "会员"],
  service_inquiry: ["服务团", "服务项目"],
  survey_inquiry: ["问卷", "调查"],
  news_inquiry: ["新闻", "资讯", "动态"],
  learning_recommend: ["学习", "培训", "课程"],
  navigation: ["打开", "跳转", "去", "前往"],
  // 保留原有意图
  suggestion: SUGGESTION_KEYWORDS,
  activity: ACTIVITY_KEYWORDS,
  activity_register: ACTIVITY_REGISTER_KEYWORDS,
  mutual_aid: MUTUAL_AID_KEYWORDS,
  activity_list: ACTIVITY_LIST_KEYWORDS,
};
