feat: integrate prompts library for community prompt browsing#76
Open
feat: integrate prompts library for community prompt browsing#76
Conversation
Add @cline/prompts library integration that allows users to browse and use community prompts from the kanban UI. Similar to the integration in the core product (cline/cline#9170). Backend: - Add PromptsService wrapping @cline/prompts for fetching/searching prompts - Add tRPC prompts API (list, getById, search endpoints) - Wire prompts router into app-router and runtime-server Frontend: - Add PromptsLibraryView component with search, category filtering, and prompt detail expansion - Add usePromptsLibrary hook for data fetching via tRPC - Add BookOpen toggle button in TopBar for opening/closing the library - Wire prompts library panel into App.tsx layout Tests: - Add prompts-service.test.ts (4 tests) - Add prompts-api.test.ts (7 tests) - Add prompts-library-view.test.tsx (9 tests)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Integrates the @cline/prompts library into kanban, allowing users to browse and use community prompts directly from the kanban UI. This is the kanban counterpart to the core product integration (cline/cline#9170).
Changes
Backend
src/services/prompts-service.ts— NewPromptsServicewrapping@cline/promptsfor fetching, searching, and retrieving prompts by IDsrc/trpc/prompts-api.ts— New tRPC router withlist,getById, andsearchendpointssrc/trpc/app-router.ts— Wire prompts router into the app routersrc/core/api-contract.ts— Add prompts types to the API contractsrc/server/runtime-server.ts— Initialize and inject PromptsServiceFrontend
web-ui/src/components/prompts-library-view.tsx— Full prompts library panel with search, category filtering, and expandable prompt detail cardsweb-ui/src/hooks/use-prompts-library.ts— React hook for data fetching via tRPCweb-ui/src/components/top-bar.tsx— BookOpen toggle button for opening/closing the libraryweb-ui/src/App.tsx— Wire prompts library panel into the app layoutTests (20 total)
test/runtime/prompts-service.test.ts— 4 teststest/runtime/prompts-api.test.ts— 7 testsweb-ui/src/components/prompts-library-view.test.tsx— 9 testsAll 291 existing tests continue to pass.