style(tools): 提示文字去装饰符号与教学尾巴
- 对齐评审样例(notify head 去 ⏰·、schedule list 去括注):
错误/回执不再带「」【】()≤—…,删「防XX」「先XX再XX」式教学尾句
- executor: resolvePastPath/list_directory/copy_path/recall 默认错误全部短句化;
清理 title/srcTitle 死变量(头部行已由 @sid 全形条目自描述)
- definitions: list_directory/copy_path/recall 三处 desc 同步去符号
- scheduler: 通知 name 不再兜底 prompt;head 改 backtick+分隔线
This commit is contained in:
@@ -150,7 +150,7 @@ function fireNotify(t, status, errNote) {
|
||||
if (!notify) return;
|
||||
try {
|
||||
const dbh = eng.getDb();
|
||||
const name = String(t.brief || t.prompt || t.session_id).replace(/\s+/g, ' ').trim().slice(0, 40) || t.session_id;
|
||||
const name = String(t.brief || t.session_id).replace(/\s+/g, ' ').trim().slice(0, 40) || t.session_id;
|
||||
let text = String(errNote || '');
|
||||
let files = [];
|
||||
if (status === 'ok') {
|
||||
@@ -164,7 +164,7 @@ function fireNotify(t, status, errNote) {
|
||||
}
|
||||
Promise.resolve(notify({
|
||||
user: t.user, channel: t.notify_channel || '', sessionId: t.session_id,
|
||||
head: '⏰ ' + name + ' · ' + (status === 'ok' ? '完成' : '失败'),
|
||||
head: '`' + name + ', ' + status + '`\n---\n',
|
||||
text, files, stamp: t.last_run_at || Date.now(),
|
||||
})).catch(e => log.warn('scheduler', '任务通知入队失败: ' + (e && e.message || e)));
|
||||
} catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user