Skip to content

Commit aaa5271

Browse files
authored
Joyride-user-project-updates (#312)
* Update Joyride User project instructions * Update Joyride workspace instructions * Remove guidance to fetch and read instructions from workspace instructions
1 parent 5298635 commit aaa5271

File tree

2 files changed

+35
-39
lines changed

2 files changed

+35
-39
lines changed

instructions/joyride-user-project.instructions.md

Lines changed: 34 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,14 @@ You are an expert Clojure interactive programmer specializing in Joyride - VS Co
99

1010
## Essential Information Sources
1111

12-
**Always use these tools first** to get comprehensive, up-to-date information:
12+
For comprehensive, up-to-date Joyride information, use the `fetch_webpage` tool to access these guides:
1313

14-
- **Joyride agent guide** - Technical guide for LLM agents using Joyride evaluation capabilities
15-
- **Joyride user guide** - Complete user assistance guide with project structure, patterns, examples, and troubleshooting
14+
- **Joyride agent guide**: https://raw.githubusercontent.com/BetterThanTomorrow/joyride/master/assets/llm-contexts/agent-joyride-eval.md
15+
- Technical guide for LLM agents using Joyride evaluation capabilities
16+
- **Joyride user guide**: https://raw.githubusercontent.com/BetterThanTomorrow/joyride/master/assets/llm-contexts/user-assistance.md
17+
- Complete user assistance guide with project structure, patterns, examples, and troubleshooting
1618

17-
These tools contain all the detailed information about Joyride APIs, project structure, common patterns, user workflows, and troubleshooting guidance.
19+
These guides contain all the detailed information about Joyride APIs, project structure, common patterns, user workflows, and troubleshooting guidance.
1820

1921
## Core Philosophy: Interactive Programming (aka REPL-Driven Development)
2022

@@ -145,40 +147,43 @@ The evaluation tool has an `awaitResult` parameter for handling async operations
145147
{:available false :reason "Extension not installed"}))
146148
```
147149

148-
### Joyride Flares - WebView Creation
149-
Joyride Flares provide a powerful way to create visual interfaces and display rich content in VS Code:
150+
## Joyride Flares - WebView Creation
150151

152+
Joyride Flares provide a convenient way to create WebView panels and sidebar views.
153+
154+
### Basic Usage
151155
```clojure
152156
(require '[joyride.flare :as flare])
153157

154-
;; Simple HTML flare
155-
(flare/flare! {:html [:h1 "Hello World!"]
156-
:title "My Flare"
157-
:key "greeting"})
158-
159-
;; Flare with external URL
160-
(flare/flare! {:url "https://example.com"
161-
:title "External Site"})
158+
;; Create a flare with Hiccup
159+
(flare/flare!+ {:html [:h1 "Hello World!"]
160+
:title "My Flare"
161+
:key "example"})
162162

163-
;; Sidebar flare
164-
(flare/flare! {:html [:div [:h2 "Sidebar"] [:p "Content"]]
165-
:sidebar-panel? true})
163+
;; Create sidebar flare (slots 1-5 available)
164+
(flare/flare!+ {:html [:div [:h2 "Sidebar"] [:p "Content"]]
165+
:key :sidebar-1})
166166

167-
;; Data visualization
168-
(flare/flare! {:html [:svg {:width 200 :height 200}
169-
[:circle {:cx 100 :cy 100 :r 50 :fill :blue}]]
170-
:title "SVG Demo"})
167+
;; Load from file (HTML or EDN with Hiccup)
168+
(flare/flare!+ {:file "assets/my-view.html"
169+
:key "my-view"})
171170

172-
;; Manage flares
173-
(flare/ls) ; List all active flares
174-
(flare/close! "greeting") ; Close specific flare by key
175-
(flare/close-all!) ; Close all flares
171+
;; Display external URL
172+
(flare/flare!+ {:url "https://example.com"
173+
:title "External Site"})
176174
```
177175

178-
**Flare Style Guidelines:**
179-
- Use maps for `:style` attributes: `{:style {:color :red :border "1px solid #ccc"}}`
180-
- Prefer keywords for simple CSS values: `:color :red`
181-
- Use strings for compound CSS property values: `:border "1px solid #ccc"`
176+
**Note**: `flare!+` returns a promise, use `awaitResult: true`.
177+
178+
### Key Points
179+
- **Hiccup styles**: Use maps for `:style` attributes: `{:color :red :margin "10px"}`
180+
- **File paths**: Absolute, relative (requires workspace), or Uri objects
181+
- **Management**: `(flare/close! key)`, `(flare/ls)`, `(flare/close-all!)`
182+
- **Bidirectional messaging**: Use `:message-handler` and `post-message!+`
183+
184+
**Full documentation**: [API docs](https://github.com/BetterThanTomorrow/joyride/blob/master/doc/api.md#joyrideflare)
185+
186+
**Comprehensive examples**: [flares_examples.cljs](https://github.com/BetterThanTomorrow/joyride/blob/master/examples/.joyride/src/flares_examples.cljs)
182187

183188
## Common User Patterns
184189

instructions/joyride-workspace-automation.instructions.md

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,12 @@
11
---
22
description: 'Expert assistance for Joyride Workspace automation - REPL-driven and user space ClojureScript automation within specific VS Code workspaces'
3-
applyTo: '.joyride/**/*.*'
3+
applyTo: "**/.joyride/**"
44
---
55

66
# Joyride Workspace Automation Assistant
77

88
You are an expert Clojure interactive programmer specializing in Joyride workspace automation - project-specific VS Code customization using ClojureScript. Joyride runs SCI ClojureScript in VS Code's Extension Host with full access to the VS Code API and workspace context. Your main tool is `joyride_evaluate_code` with which you test and validate code directly in VS Code's runtime environment. The REPL is your superpower - use it to provide tested, working solutions rather than theoretical suggestions.
99

10-
## Essential Information Sources
11-
12-
**Always use these tools first** to get comprehensive, up-to-date information:
13-
14-
- `joyride_basics_for_agents` - Technical guide for LLM agents using Joyride evaluation capabilities
15-
- `joyride_assisting_users_guide` - Complete user assistance guide with project structure, patterns, examples, and troubleshooting
16-
17-
These tools contain all the detailed information about Joyride APIs, project structure, common patterns, user workflows, and troubleshooting guidance.
18-
1910
## Workspace Context Focus
2011

2112
You specialize in **workspace-specific automation** - scripts and customizations that are:

0 commit comments

Comments
 (0)