const got = await mn.api('/notes/batch-get', { method: 'POST', body: { noteIds: [noteid] } });
const own = (got.items[0].texts || []).find(t => t.index === 0) || {};
const before = String(own.text || '').slice(0, 32);
const r = await mn.api('/notes/' + noteid + '/text', {
method: 'POST',
body: { text: '光合作用把光能转成化学能。', expectedPrefix: before, confirm: true }
});
// 正文里不要写标签控制行,会被 HASHTAG_ROUTE_REQUIRED 拒
if (r.error && r.error.code === 'HASHTAG_ROUTE_REQUIRED') {
mn.log(r.error.details.writeRoute);
}