Files
smartmate/backend/services/agent/shared/task_priority.go
Losita d7184b776b Version: 0.9.75.dev.260505
后端:
1.收口阶段 6 agent 结构迁移,将 newAgent 内核与 agentsvc 编排层迁入 services/agent
- 切换 Agent 启动装配与 HTTP handler 直连 agent sv,移除旧 service agent bridge
- 补齐 Agent 对 memory、task、task-class、schedule 的 RPC 适配与契约字段
- 扩展 schedule、task、task-class RPC/contract 支撑 Agent 查询、写入与 provider 切流
- 更新迁移文档、README 与相关注释,明确 agent 当前切流点和剩余 memory 迁移面
2026-05-05 16:00:57 +08:00

36 lines
1.0 KiB
Go

package agentshared
const (
TaskPriorityImportantUrgent = 1
TaskPriorityImportantNotUrgent = 2
TaskPrioritySimpleNotImportant = 3
TaskPriorityComplexNotImportant = 4
)
// QuickNote 优先级别名,保持与旧 agent/model 命名兼容。
const (
QuickNotePriorityImportantUrgent = TaskPriorityImportantUrgent
QuickNotePriorityImportantNotUrgent = TaskPriorityImportantNotUrgent
QuickNotePrioritySimpleNotImportant = TaskPrioritySimpleNotImportant
QuickNotePriorityComplexNotImportant = TaskPriorityComplexNotImportant
)
func IsValidTaskPriority(priority int) bool {
return priority >= TaskPriorityImportantUrgent && priority <= TaskPriorityComplexNotImportant
}
func PriorityLabelCN(priority int) string {
switch priority {
case TaskPriorityImportantUrgent:
return "重要且紧急"
case TaskPriorityImportantNotUrgent:
return "重要不紧急"
case TaskPrioritySimpleNotImportant:
return "简单不重要"
case TaskPriorityComplexNotImportant:
return "复杂不重要"
default:
return "未知优先级"
}
}