diff --git a/.github/workflows/opencode.yml b/.github/workflows/opencode.yml index aff314f5..7a583769 100644 --- a/.github/workflows/opencode.yml +++ b/.github/workflows/opencode.yml @@ -1,32 +1,32 @@ name: opencode on: - issue_comment: - types: [created] - pull_request_review_comment: - types: [created] + issue_comment: + types: [created] + pull_request_review_comment: + types: [created] permissions: - id-token: write - contents: read - pull-requests: read - issues: read + id-token: write + contents: read + pull-requests: read + issues: read jobs: - opencode: - if: | - contains(github.event.comment.body, ' /oc') || - startsWith(github.event.comment.body, '/oc') || - contains(github.event.comment.body, ' /opencode') || - startsWith(github.event.comment.body, '/opencode') - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v6 + opencode: + if: | + contains(github.event.comment.body, ' /opencode') || + contains(github.event.comment.body, ' /oc') || + startsWith(github.event.comment.body, '/oc') || + startsWith(github.event.comment.body, '/opencode') + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v6 - - name: Run opencode - uses: anomalyco/opencode/github@latest - env: - OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }} - with: - model: opencode/grok-code \ No newline at end of file + - name: Run opencode + uses: anomalyco/opencode/github@latest + env: + OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }} + with: + model: opencode/grok-code diff --git a/app/chat/components/agent-tools.tsx b/app/chat/components/agent-tools.tsx index 139f4ca2..638daa5d 100644 --- a/app/chat/components/agent-tools.tsx +++ b/app/chat/components/agent-tools.tsx @@ -19,10 +19,31 @@ import { BatchWebScraperTool, SiteMapExtractorTool, LinkExtractorTool, + FinancialQuoteCard, + FinancialChart, + CompanyProfileCard, + RepositoryCard, + PullRequestList, + IssueCard, + CommitHistoryList, + WeatherCard, + ForecastView, + ArxivPaperCard, + type WebScraperUITool, type BatchWebScraperUITool, type SiteMapExtractorUITool, - type LinkExtractorUITool + type LinkExtractorUITool, + type FinnhubQuotesUITool, + type PolygonStockQuotesUITool, + type ChartSupervisorUITool, + type ListRepositoriesUITool, + type ListPullRequestsUITool, + type GetIssueUITool, + type ListCommitsUITool, + type WeatherUITool, // Assuming this exists for WeatherCard and ForecastView + type ArxivUITool, + } from "@/src/components/ai-elements/tools" function getProgressMessage(tool: ToolInvocationState | DynamicToolUIPart): string | null { @@ -143,6 +164,145 @@ export function AgentTools({ tools, className }: AgentToolsProps) { ) } + if ((toolName === "finnhub-quotes" || toolName === "polygon-stock-quotes") && hasOutput) { + return ( + + ) + } + + if (toolName === "chart-supervisor" && hasOutput) { + return ( + + ) + } + + if (toolName === "github-list-repositories" && hasOutput) { + return ( + + ) + } + + if (toolName === "github-list-pull-requests" && hasOutput) { + return ( + + ) + } + + if (toolName === "github-get-issue" && hasOutput) { + return ( + + ) + } + + if ((toolName === "finnhub-company" || toolName === "polygon-stock-fundamentals") && hasOutput) { + return ( + + ) + } + + if (toolName === "github-list-commits" && hasOutput) { + return ( + + ) + } + + if (toolName === "weatherTool" && hasOutput) { + return ( +
+ + +
+ ) + } + + if ((toolName === "serpapi-news-trends" || toolName === "finnhub-company-news") && hasOutput) { + return ( + + ) + } + + if (toolName === "arxiv-search" && hasOutput) { + return ( + + ) + } + + if (toolName === "serpapi-search" && hasOutput) { + return ( + + ) + } + // Default rendering for other tools return ( ` in HTML. + +## 2. HTML Style Rules +- **Document Type:** Use ``. +- **HTML Validity:** Use valid HTML. +- **Semantics:** Use HTML elements according to their intended purpose (e.g., use `

` for paragraphs, not for spacing). +- **Multimedia Fallback:** Provide `alt` text for images and transcripts/captions for audio/video. +- **Separation of Concerns:** Strictly separate structure (HTML), presentation (CSS), and behavior (JavaScript). Link to CSS and JS from external files. +- **`type` Attributes:** Omit `type` attributes for stylesheets (``) and scripts (`