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:
@@ -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));
|
||||
});
|
||||
Reference in New Issue
Block a user