From 33cc6cc04b10125b4a36fa8ed57db1fa7e9d76a4 Mon Sep 17 00:00:00 2001 From: Hannes Rudolph Date: Thu, 29 Jan 2026 11:30:48 -0700 Subject: [PATCH] =?UTF-8?q?Revert=20"refactor:=20replace=20fetch=5Finstruc?= =?UTF-8?q?tions=20with=20skill=20tool=20and=20built-in=20ski=E2=80=A6"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 67e568f6bb3463bcaa1e15ef807480202c6ce714. --- apps/cli/src/ui/components/tools/types.ts | 10 +- apps/cli/src/ui/components/tools/utils.ts | 6 +- apps/web-roo-code/src/app/linear/page.tsx | 413 ++++++++++++++++ .../src/components/chromes/nav-bar.tsx | 20 + .../components/linear/linear-issue-demo.tsx | 442 ++++++++++++++++++ packages/types/src/__tests__/skills.test.ts | 144 ++++++ packages/types/src/global-settings.ts | 1 + packages/types/src/index.ts | 1 + packages/types/src/skills.ts | 71 +++ packages/types/src/tool.ts | 2 +- packages/types/src/vscode-extension-host.ts | 17 +- .../assistant-message/NativeToolCallParser.ts | 34 +- .../presentAssistantMessage.ts | 21 +- src/core/auto-approval/index.ts | 13 +- .../__tests__/add-custom-instructions.spec.ts | 4 + .../__tests__/custom-system-prompt.spec.ts | 3 + .../prompts/__tests__/system-prompt.spec.ts | 15 +- .../instructions/create-mcp-server.ts} | 155 +----- src/core/prompts/instructions/create-mode.ts | 62 +++ src/core/prompts/instructions/instructions.ts | 25 + src/core/prompts/sections/modes.ts | 20 +- src/core/prompts/sections/skills.ts | 23 +- src/core/prompts/system.ts | 3 + .../tools/native-tools/fetch_instructions.ts | 26 ++ src/core/prompts/tools/native-tools/index.ts | 4 +- src/core/prompts/tools/native-tools/skill.ts | 33 -- src/core/task/Task.ts | 2 + src/core/tools/FetchInstructionsTool.ts | 75 +++ src/core/tools/SkillTool.ts | 112 ----- src/core/tools/__tests__/skillTool.spec.ts | 345 -------------- src/core/webview/ClineProvider.ts | 3 + .../webview/__tests__/ClineProvider.spec.ts | 37 +- ...ateSystemPrompt.browser-capability.spec.ts | 1 + .../__tests__/skillsMessageHandler.spec.ts | 334 +++++++++++++ src/core/webview/generateSystemPrompt.ts | 2 + src/core/webview/skillsMessageHandler.ts | 133 ++++++ src/core/webview/webviewMessageHandler.ts | 21 + src/i18n/locales/ca/skills.json | 14 + src/i18n/locales/de/skills.json | 14 + src/i18n/locales/en/skills.json | 14 + src/i18n/locales/es/skills.json | 14 + src/i18n/locales/fr/skills.json | 14 + src/i18n/locales/hi/skills.json | 14 + src/i18n/locales/id/skills.json | 14 + src/i18n/locales/it/skills.json | 14 + src/i18n/locales/ja/skills.json | 14 + src/i18n/locales/ko/skills.json | 14 + src/i18n/locales/nl/skills.json | 14 + src/i18n/locales/pl/skills.json | 14 + src/i18n/locales/pt-BR/skills.json | 14 + src/i18n/locales/ru/skills.json | 14 + src/i18n/locales/tr/skills.json | 14 + src/i18n/locales/vi/skills.json | 14 + src/i18n/locales/zh-CN/skills.json | 14 + src/i18n/locales/zh-TW/skills.json | 14 + src/package.json | 2 - src/services/skills/SkillsManager.ts | 207 ++++++-- .../skills/__tests__/SkillsManager.spec.ts | 323 ++++++++++++- .../generate-built-in-skills.spec.ts | 175 ------- .../built-in/create-mcp-server/SKILL.md | 304 ------------ .../skills/built-in/create-mode/SKILL.md | 57 --- .../skills/generate-built-in-skills.ts | 302 ------------ src/shared/skills.ts | 4 +- src/shared/tools.ts | 18 +- webview-ui/src/components/chat/ChatRow.tsx | 73 +-- webview-ui/src/components/mcp/McpView.tsx | 46 +- .../components/settings/CreateSkillDialog.tsx | 254 ++++++++++ .../src/components/settings/SettingsView.tsx | 7 + .../src/components/settings/SkillItem.tsx | 61 +++ .../components/settings/SkillsSettings.tsx | 228 +++++++++ .../__tests__/CreateSkillDialog.spec.tsx | 404 ++++++++++++++++ .../SettingsView.change-detection.spec.tsx | 25 + .../settings/__tests__/SettingsView.spec.tsx | 11 + .../SettingsView.unsaved-changes.spec.tsx | 25 + .../settings/__tests__/SkillItem.spec.tsx | 141 ++++++ .../__tests__/SkillsSettings.spec.tsx | 436 +++++++++++++++++ .../src/context/ExtensionStateContext.tsx | 13 + .../__tests__/ExtensionStateContext.spec.tsx | 1 + webview-ui/src/i18n/locales/ca/chat.json | 4 - webview-ui/src/i18n/locales/ca/settings.json | 48 +- webview-ui/src/i18n/locales/de/chat.json | 4 - webview-ui/src/i18n/locales/de/settings.json | 48 +- webview-ui/src/i18n/locales/en/chat.json | 5 +- webview-ui/src/i18n/locales/en/settings.json | 46 ++ webview-ui/src/i18n/locales/es/chat.json | 4 - webview-ui/src/i18n/locales/es/settings.json | 48 +- webview-ui/src/i18n/locales/fr/chat.json | 4 - webview-ui/src/i18n/locales/fr/settings.json | 48 +- webview-ui/src/i18n/locales/hi/chat.json | 4 - webview-ui/src/i18n/locales/hi/settings.json | 48 +- webview-ui/src/i18n/locales/id/chat.json | 4 - webview-ui/src/i18n/locales/id/settings.json | 48 +- webview-ui/src/i18n/locales/it/chat.json | 4 - webview-ui/src/i18n/locales/it/settings.json | 48 +- webview-ui/src/i18n/locales/ja/chat.json | 4 - webview-ui/src/i18n/locales/ja/settings.json | 48 +- webview-ui/src/i18n/locales/ko/chat.json | 4 - webview-ui/src/i18n/locales/ko/settings.json | 48 +- webview-ui/src/i18n/locales/nl/chat.json | 4 - webview-ui/src/i18n/locales/nl/settings.json | 48 +- webview-ui/src/i18n/locales/pl/chat.json | 4 - webview-ui/src/i18n/locales/pl/settings.json | 48 +- webview-ui/src/i18n/locales/pt-BR/chat.json | 4 - .../src/i18n/locales/pt-BR/settings.json | 48 +- webview-ui/src/i18n/locales/ru/chat.json | 4 - webview-ui/src/i18n/locales/ru/settings.json | 48 +- webview-ui/src/i18n/locales/tr/chat.json | 4 - webview-ui/src/i18n/locales/tr/settings.json | 48 +- webview-ui/src/i18n/locales/vi/chat.json | 4 - webview-ui/src/i18n/locales/vi/settings.json | 48 +- webview-ui/src/i18n/locales/zh-CN/chat.json | 4 - .../src/i18n/locales/zh-CN/settings.json | 48 +- webview-ui/src/i18n/locales/zh-TW/chat.json | 4 - .../src/i18n/locales/zh-TW/settings.json | 58 ++- 114 files changed, 5198 insertions(+), 1749 deletions(-) create mode 100644 apps/web-roo-code/src/app/linear/page.tsx create mode 100644 apps/web-roo-code/src/components/linear/linear-issue-demo.tsx create mode 100644 packages/types/src/__tests__/skills.test.ts create mode 100644 packages/types/src/skills.ts rename src/{services/skills/built-in-skills.ts => core/prompts/instructions/create-mcp-server.ts} (61%) create mode 100644 src/core/prompts/instructions/create-mode.ts create mode 100644 src/core/prompts/instructions/instructions.ts create mode 100644 src/core/prompts/tools/native-tools/fetch_instructions.ts delete mode 100644 src/core/prompts/tools/native-tools/skill.ts create mode 100644 src/core/tools/FetchInstructionsTool.ts delete mode 100644 src/core/tools/SkillTool.ts delete mode 100644 src/core/tools/__tests__/skillTool.spec.ts create mode 100644 src/core/webview/__tests__/skillsMessageHandler.spec.ts create mode 100644 src/core/webview/skillsMessageHandler.ts create mode 100644 src/i18n/locales/ca/skills.json create mode 100644 src/i18n/locales/de/skills.json create mode 100644 src/i18n/locales/en/skills.json create mode 100644 src/i18n/locales/es/skills.json create mode 100644 src/i18n/locales/fr/skills.json create mode 100644 src/i18n/locales/hi/skills.json create mode 100644 src/i18n/locales/id/skills.json create mode 100644 src/i18n/locales/it/skills.json create mode 100644 src/i18n/locales/ja/skills.json create mode 100644 src/i18n/locales/ko/skills.json create mode 100644 src/i18n/locales/nl/skills.json create mode 100644 src/i18n/locales/pl/skills.json create mode 100644 src/i18n/locales/pt-BR/skills.json create mode 100644 src/i18n/locales/ru/skills.json create mode 100644 src/i18n/locales/tr/skills.json create mode 100644 src/i18n/locales/vi/skills.json create mode 100644 src/i18n/locales/zh-CN/skills.json create mode 100644 src/i18n/locales/zh-TW/skills.json delete mode 100644 src/services/skills/__tests__/generate-built-in-skills.spec.ts delete mode 100644 src/services/skills/built-in/create-mcp-server/SKILL.md delete mode 100644 src/services/skills/built-in/create-mode/SKILL.md delete mode 100644 src/services/skills/generate-built-in-skills.ts create mode 100644 webview-ui/src/components/settings/CreateSkillDialog.tsx create mode 100644 webview-ui/src/components/settings/SkillItem.tsx create mode 100644 webview-ui/src/components/settings/SkillsSettings.tsx create mode 100644 webview-ui/src/components/settings/__tests__/CreateSkillDialog.spec.tsx create mode 100644 webview-ui/src/components/settings/__tests__/SkillItem.spec.tsx create mode 100644 webview-ui/src/components/settings/__tests__/SkillsSettings.spec.tsx diff --git a/apps/cli/src/ui/components/tools/types.ts b/apps/cli/src/ui/components/tools/types.ts index a16fbd60ea3..28a1b5faa02 100644 --- a/apps/cli/src/ui/components/tools/types.ts +++ b/apps/cli/src/ui/components/tools/types.ts @@ -16,7 +16,15 @@ export type ToolCategory = | "other" export function getToolCategory(toolName: string): ToolCategory { - const fileReadTools = ["readFile", "read_file", "skill", "listFilesTopLevel", "listFilesRecursive", "list_files"] + const fileReadTools = [ + "readFile", + "read_file", + "fetchInstructions", + "fetch_instructions", + "listFilesTopLevel", + "listFilesRecursive", + "list_files", + ] const fileWriteTools = [ "editedExistingFile", diff --git a/apps/cli/src/ui/components/tools/utils.ts b/apps/cli/src/ui/components/tools/utils.ts index 31acf2cccbc..5eaee33b127 100644 --- a/apps/cli/src/ui/components/tools/utils.ts +++ b/apps/cli/src/ui/components/tools/utils.ts @@ -50,7 +50,8 @@ export function getToolDisplayName(toolName: string): string { // File read operations readFile: "Read", read_file: "Read", - skill: "Load Skill", + fetchInstructions: "Fetch Instructions", + fetch_instructions: "Fetch Instructions", listFilesTopLevel: "List Files", listFilesRecursive: "List Files (Recursive)", list_files: "List Files", @@ -106,7 +107,8 @@ export function getToolIconName(toolName: string): IconName { // File read operations readFile: "file", read_file: "file", - skill: "file", + fetchInstructions: "file", + fetch_instructions: "file", listFilesTopLevel: "folder", listFilesRecursive: "folder", list_files: "folder", diff --git a/apps/web-roo-code/src/app/linear/page.tsx b/apps/web-roo-code/src/app/linear/page.tsx new file mode 100644 index 00000000000..40334e2698a --- /dev/null +++ b/apps/web-roo-code/src/app/linear/page.tsx @@ -0,0 +1,413 @@ +import { + ArrowRight, + CheckCircle, + CreditCard, + Eye, + GitBranch, + GitPullRequest, + Link2, + MessageSquare, + Settings, + Shield, +} from "lucide-react" +import type { LucideIcon } from "lucide-react" +import type { Metadata } from "next" + +import { AnimatedBackground } from "@/components/homepage" +import { LinearIssueDemo } from "@/components/linear/linear-issue-demo" +import { Button } from "@/components/ui" +import { EXTERNAL_LINKS } from "@/lib/constants" +import { SEO } from "@/lib/seo" +import { ogImageUrl } from "@/lib/og" + +const TITLE = "Roo Code for Linear" +const DESCRIPTION = "Assign development work to @Roo Code directly from Linear. Get PRs back without switching tools." +const OG_DESCRIPTION = "Turn Linear Issues into Pull Requests" +const PATH = "/linear" + +// Featured Workflow section is temporarily commented out until video is ready +// const LINEAR_DEMO_YOUTUBE_ID = "" + +export const metadata: Metadata = { + title: TITLE, + description: DESCRIPTION, + alternates: { + canonical: `${SEO.url}${PATH}`, + }, + openGraph: { + title: TITLE, + description: DESCRIPTION, + url: `${SEO.url}${PATH}`, + siteName: SEO.name, + images: [ + { + url: ogImageUrl(TITLE, OG_DESCRIPTION), + width: 1200, + height: 630, + alt: TITLE, + }, + ], + locale: SEO.locale, + type: "website", + }, + twitter: { + card: SEO.twitterCard, + title: TITLE, + description: DESCRIPTION, + images: [ogImageUrl(TITLE, OG_DESCRIPTION)], + }, + keywords: [ + ...SEO.keywords, + "linear integration", + "issue to PR", + "AI in Linear", + "engineering workflow automation", + "Roo Code Cloud", + ], +} + +// Invalidate cache when a request comes in, at most once every hour. +export const revalidate = 3600 + +type ValueProp = { + icon: LucideIcon + title: string + description: string +} + +const VALUE_PROPS: ValueProp[] = [ + { + icon: GitBranch, + title: "Work where you already work.", + description: + "Assign development work to @Roo Code directly from Linear. No new tools to learn, no context switching required.", + }, + { + icon: Eye, + title: "Progress is visible.", + description: + "Watch progress unfold in real-time. Roo Code posts updates as comments, so your whole team stays in the loop.", + }, + { + icon: MessageSquare, + title: "Mention for refinement.", + description: + 'Need changes? Just comment "@Roo Code also add dark mode support" and the agent picks up where it left off.', + }, + { + icon: Link2, + title: "Full traceability.", + description: + "Every PR links back to the originating issue. Every issue shows its linked PR. Your audit trail stays clean.", + }, + { + icon: Settings, + title: "Organization-level setup.", + description: + "Connect once, use everywhere. Your team members can assign issues to @Roo Code without individual configuration.", + }, + { + icon: Shield, + title: "Safe by design.", + description: + "Agents never touch main/master directly. They produce branches and PRs. You review and approve before merge.", + }, +] + +// type WorkflowStep = { +// step: number +// title: string +// description: string +// } + +// const WORKFLOW_STEPS: WorkflowStep[] = [ +// { +// step: 1, +// title: "Create an issue", +// description: "Write your issue with acceptance criteria. Be as detailed as you like.", +// }, +// { +// step: 2, +// title: "Call @Roo Code", +// description: "Mention @Roo Code in a comment to start. The agent begins working immediately.", +// }, +// { +// step: 3, +// title: "Watch progress", +// description: "Roo Code posts status updates as comments. Refine with @-mentions if needed.", +// }, +// { +// step: 4, +// title: "Review the PR", +// description: "When ready, the PR link appears in the issue. Review, iterate, and ship.", +// }, +// ] + +type OnboardingStep = { + icon: LucideIcon + title: string + description: string + link?: { + href: string + text: string + } +} + +const ONBOARDING_STEPS: OnboardingStep[] = [ + { + icon: CreditCard, + title: "1. Team Plan", + description: "Linear integration requires a Team plan.", + link: { + href: EXTERNAL_LINKS.CLOUD_APP_TEAM_TRIAL, + text: "Start a free trial", + }, + }, + { + icon: GitPullRequest, + title: "2. Connect GitHub", + description: "Link your repositories so Roo Code can open PRs on your behalf.", + }, + { + icon: Settings, + title: "3. Connect Linear", + description: "Authorize via OAuth. No API keys to manage or rotate.", + }, + { + icon: CheckCircle, + title: "4. Link & Start", + description: "Map your Linear project to a repo, then assign or mention @Roo Code.", + }, +] + +function LinearIcon({ className }: { className?: string }) { + return ( + + + + ) +} + +export default function LinearPage(): JSX.Element { + return ( + <> + {/* Hero Section */} +
+ +
+
+
+
+ + Powered by Roo Code Cloud +
+

+ Turn Linear Issues into Pull Requests +

+

+ Assign development work to @Roo Code directly from Linear. Get PRs back without + switching tools. +

+ +
+ +
+ +
+
+
+
+ + {/* Value Props Section */} +
+
+
+
+
+
+

+ Why your team will love using Roo Code in Linear +

+

+ AI agents that understand context, keep your team in the loop, and deliver PRs you can + review. +

+
+
+ {VALUE_PROPS.map((prop, index) => { + const Icon = prop.icon + return ( +
+
+ +
+

{prop.title}

+

{prop.description}

+
+ ) + })} +
+
+
+ + {/* Featured Workflow Section - temporarily commented out until video is ready +
+
+
+
+
+ +
+
+ + Featured Workflow +
+

Issue to Shipped Feature

+

+ Stay in Linear from assignment to review. Roo Code keeps the issue updated and links the PR + when it's ready. +

+
+ +
+
+ {/* YouTube Video Embed or Placeholder */} + {/*
+ {LINEAR_DEMO_YOUTUBE_ID ? ( +