GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: tweak websearch tool description date info to avoid cache busts … · starascendin/opencode@daf564b

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • packages/opencode/src/tool
    • websearch.ts
    • websearch.txt
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎packages/opencode/src/tool/websearch.ts‎

Copy file name to clipboardExpand all lines: packages/opencode/src/tool/websearch.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ interface McpSearchResponse {
4040
export const WebSearchTool = Tool.define("websearch", async () => {
4141
return {
4242
get description() {
43-
return DESCRIPTION.replace("{{date}}", new Date().toISOString().slice(0, 10))
43+
return DESCRIPTION.replace("{{year}}", new Date().getFullYear().toString())
4444
},
4545
parameters: z.object({
4646
query: z.string().describe("Websearch query"),
Collapse file

‎packages/opencode/src/tool/websearch.txt‎

Copy file name to clipboardExpand all lines: packages/opencode/src/tool/websearch.txt
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ Usage notes:
1010
- Configurable context length for optimal LLM integration
1111
- Domain filtering and advanced search options available
1212

13-
Today's date is {{date}}. You MUST use this year when searching for recent information or current events
14-
- Example: If today is 2025-07-15 and the user asks for "latest AI news", search for "AI news 2025", NOT "AI news 2024"
13+
The current year is {{year}}. You MUST use this year when searching for recent information or current events
14+
- Example: If the current year is 2026 and the user asks for "latest AI news", search for "AI news 2026", NOT "AI news 2025"

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.