mirror of
https://github.com/hansjone/dsh-ops-cron.git
synced 2026-10-16 13:43:17 +08:00
Inherit agent presets and auto-bind IM delivery targets (0.1.7).
Cron jobs created from WhatsApp can omit bot/target ids and reuse chat overrides; sidebar/agent preset pins persist on fire. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
2f08136adf
commit
2e690c30c8
15 changed files with 830 additions and 82 deletions
11
lib/fire.js
11
lib/fire.js
|
|
@ -23,7 +23,7 @@ export function createRunRecord(job, decision, now, trigger) {
|
|||
}
|
||||
}
|
||||
|
||||
export const TITLE_PREFIX = '运维定时 · '
|
||||
export const TITLE_PREFIX = '定时任务 · '
|
||||
|
||||
export function extractAssistantText(messages, maxChars = 4000) {
|
||||
if (!Array.isArray(messages)) return ''
|
||||
|
|
@ -55,8 +55,15 @@ export function publicJob(job) {
|
|||
provider: job.provider || '',
|
||||
model: job.model || '',
|
||||
reasoningEffort: job.reasoningEffort || '',
|
||||
agentPreset: job.agentPreset || '',
|
||||
delivery: job.delivery && job.delivery.kind === 'im'
|
||||
? { kind: 'im', botId: job.delivery.botId, targetId: job.delivery.targetId }
|
||||
? {
|
||||
kind: 'im',
|
||||
botId: job.delivery.botId,
|
||||
targetId: job.delivery.targetId,
|
||||
...job.delivery.mentionJid ? { mentionJid: job.delivery.mentionJid } : {},
|
||||
...job.delivery.mentionName ? { mentionName: job.delivery.mentionName } : {},
|
||||
}
|
||||
: { kind: 'dsh' },
|
||||
schedule: job.schedule,
|
||||
createdAt: job.createdAt,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue