feat(onebot): expose friend remarks in stranger info

Return the already-decoded profile remark from fetched and cached get_stranger_info results, document its fallback shape, and regenerate the MCP action catalog.

Fixes #290
This commit is contained in:
DrSmoothl committed 2026-07-28 23:59:25 +08:00
1 parent eeaa5436fd
commit 19e3135e63
6 files changed
+38 -10

No files matched your search

+4 -1
View File
@@ -15,6 +15,7 @@ describe('get_stranger_info action', () => {
data: {
user_id: 123456,
nickname: '',
remark: '',
sex: 'unknown',
age: 0,
long_nick: '',
@@ -22,15 +23,17 @@ describe('get_stranger_info action', () => {
});
});
it('documents long_nick as a required string response field', () => {
it('documents remark and long_nick as required string response fields', () => {
const schema = getStrangerInfo.describe().returnsSchema;
expect(schema).toMatchObject({
type: 'object',
properties: {
remark: { type: 'string', description: '好友备注;非好友或未设置时为空字符串' },
long_nick: { type: 'string', description: '个性签名' },
},
});
expect(schema?.required).toContain('remark');
expect(schema?.required).toContain('long_nick');
});
});