feat: refactor context usage and add search template route

- Updated context key usage from `useConfigKey` to `useContextKey` in app initialization.
- Introduced a new route for searching templates related to 小红书 with a default keyword.
- Enhanced error handling for saving notes and user information.
- Added a command for searching templates in the CLI.
- Created a new agent plugin for browser integration.
This commit is contained in:
2026-01-21 01:45:27 +08:00
parent e5ddd01fd2
commit e5c3ec3f79
8 changed files with 162 additions and 418 deletions

View File

@@ -16,3 +16,18 @@ program
console.log(showMore(res));
});
program.command('xhs:search-template')
.description('搜索小红书的模板相关参数是keyword默认搜索"网站模板"')
.option('-k, --keyword <string>', '搜索关键词', '网站模板')
.action(async (options) => {
const res = await app.run({
path: 'good',
key: 'searchTemplate',
payload: {
keyword: options.keyword,
}
});
console.log(showMore(res));
});