feat(voice): 提升桌面端语音交互与本地任务执行支持

This commit is contained in:
Blizzard
2026-07-24 16:40:25 +08:00
parent e9a8b9b4c6
commit aba88193d8
33 changed files with 1909 additions and 102 deletions
@@ -100,6 +100,18 @@ type AdminEval struct {
// TaskOwner 按 task_id 返回提交者 user.id(供 SSE/导出等公开 by-id 端点做归属校验)。
// 跨租户查(WithoutTenant):这些端点无租户上下文,靠 owner 判权。不存在返回空串。
// TaskTopic 报告类任务的主题(graph 顶层 topic;普通任务无此字段返回空)。主动播报用。
func (p *Postgres) TaskTopic(ctx context.Context, taskID string) string {
if p.db == nil || taskID == "" {
return ""
}
var topic string
p.db.WithContext(WithoutTenant(ctx)).Table("sundynix_task").
Where("task_id = ? and deleted_at is null", taskID).
Select("coalesce(graph->>'topic','')").Scan(&topic)
return topic
}
func (p *Postgres) TaskOwner(ctx context.Context, taskID string) string {
if p.db == nil || taskID == "" {
return ""