@gui-chat-plugin/browse
v0.1.1
Published
Web browsing plugin for GUI Chat applications
Readme
@gui-chat-plugin/browse
Web browsing plugin for GUI Chat applications. Browse and extract content from web pages.
Features
- Extract content from any web page URL
- Twitter/X post embedding support
- Article content parsing (title, byline, excerpt, body)
- Clean, readable content display
Installation
yarn add @gui-chat-plugin/browseUsage
Vue Integration
// In src/tools/index.ts
import BrowsePlugin from "@gui-chat-plugin/browse/vue";
const pluginList = [
// ... other plugins
BrowsePlugin,
];
// In src/main.ts
import "@gui-chat-plugin/browse/style.css";Core-only Usage
import { executeBrowse, TOOL_DEFINITION } from "@gui-chat-plugin/browse";
// Browse a webpage
const result = await executeBrowse(context, {
url: "https://example.com/article",
});API
BrowseArgs
interface BrowseArgs {
url: string; // The URL of the webpage to browse
}BrowseToolData
interface BrowseToolData {
url: string;
twitterEmbedHtml?: string | null;
}BrowseJsonData
interface BrowseJsonData {
data: {
title?: string;
description?: string;
content?: string;
textContent?: string;
text?: string;
byline?: string;
excerpt?: string;
};
}Development
# Install dependencies
yarn install
# Run demo
yarn dev
# Build
yarn build
# Lint
yarn lintTest Prompts
Try these prompts to test the plugin:
- "Browse the Wikipedia page about artificial intelligence and tell me the key points"
- "Show me what's on the Hacker News homepage"
- "Read this article and summarize it: https://example.com/article"
License
MIT
