[PR #301] [MERGED] Improved prompt function add add ctx.* functions #223

Closed
opened 2025-12-29 07:19:56 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/mountain-loop/yaak/pull/301
Author: @gschier
Created: 11/13/2025
Status: Merged
Merged: 11/15/2025
Merged by: @gschier

Base: mainHead: better-prompt


📝 Commits (10+)

  • dd67d23 Improved prompt function add add ctx.* functions
  • 456a423 Add previewType to plugins
  • cc3cb6f Wrap dynamic form HSTack
  • 52fcd1b Refined prompt form inputs
  • d14dd2c Better error
  • c97dd4f Address PR feedback
  • 2d8436d Merge branch 'main' into better-prompt
  • 8e3cc94 Tweak
  • cda43a9 Merge remote-tracking branch 'origin/better-prompt' into better-prompt
  • 577f429 Remove unused TemplateVariableDialog.tsx

📊 Changes

29 files changed (+455 additions, -151 deletions)

View changed files

📝 package-lock.json (+19 -2)
📝 package.json (+1 -0)
📝 packages/plugin-runtime-types/package.json (+1 -1)
📝 packages/plugin-runtime-types/src/bindings/gen_events.ts (+10 -4)
📝 packages/plugin-runtime-types/src/plugins/Context.ts (+4 -1)
📝 packages/plugin-runtime/src/PluginInstance.ts (+52 -22)
plugins/template-function-ctx/package.json (+12 -0)
plugins/template-function-ctx/src/index.ts (+30 -0)
plugins/template-function-ctx/tsconfig.json (+3 -0)
📝 plugins/template-function-json/src/index.ts (+0 -1)
📝 plugins/template-function-prompt/package.json (+4 -1)
📝 plugins/template-function-prompt/src/index.ts (+169 -20)
📝 src-tauri/src/lib.rs (+2 -1)
📝 src-tauri/src/plugin_events.rs (+25 -1)
📝 src-tauri/yaak-plugins/bindings/gen_events.ts (+10 -4)
📝 src-tauri/yaak-plugins/src/events.rs (+37 -0)
📝 src-tauri/yaak-plugins/src/native_template_functions.rs (+3 -1)
📝 src-web/commands/commands.tsx (+0 -1)
📝 src-web/components/DynamicForm.tsx (+3 -3)
📝 src-web/components/RequestMethodDropdown.tsx (+0 -1)

...and 9 more files

📄 Description

  • Add storage options to prompt.text()
  • Add window.(requestId|environmentId|workspaceId) plugin APIs
  • Add window.request() etc template functions
  • Add new previewType (live | click | never) to template function definition
  • Add new Refresh icon to the template function dialog preview
CleanShot 2025-11-14 at 08 43 14@2x

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/mountain-loop/yaak/pull/301 **Author:** [@gschier](https://github.com/gschier) **Created:** 11/13/2025 **Status:** ✅ Merged **Merged:** 11/15/2025 **Merged by:** [@gschier](https://github.com/gschier) **Base:** `main` ← **Head:** `better-prompt` --- ### 📝 Commits (10+) - [`dd67d23`](https://github.com/mountain-loop/yaak/commit/dd67d2354185e52a36cbffdc75853801d0956269) Improved prompt function add add ctx.* functions - [`456a423`](https://github.com/mountain-loop/yaak/commit/456a423c7bd552923b11271cae2d446d3c6cd196) Add previewType to plugins - [`cc3cb6f`](https://github.com/mountain-loop/yaak/commit/cc3cb6fe2fb30768dc7d023fb74769cbbd8a72d0) Wrap dynamic form HSTack - [`52fcd1b`](https://github.com/mountain-loop/yaak/commit/52fcd1b57df23cd419241067f4d1f3521aa5f1d2) Refined prompt form inputs - [`d14dd2c`](https://github.com/mountain-loop/yaak/commit/d14dd2c9ad936e3e2216d83b43e5d9b5184fd53a) Better error - [`c97dd4f`](https://github.com/mountain-loop/yaak/commit/c97dd4f7a1441a0123738bdac3ea310f4cdacda0) Address PR feedback - [`2d8436d`](https://github.com/mountain-loop/yaak/commit/2d8436d3053511b8cd2b0c7deb3ae9044fac2927) Merge branch 'main' into better-prompt - [`8e3cc94`](https://github.com/mountain-loop/yaak/commit/8e3cc943596d7aa93b439c19291033a9ae5b4587) Tweak - [`cda43a9`](https://github.com/mountain-loop/yaak/commit/cda43a96fa36e5f64ec4538593b5f2d94ea5a347) Merge remote-tracking branch 'origin/better-prompt' into better-prompt - [`577f429`](https://github.com/mountain-loop/yaak/commit/577f429682f63e0c095ed43f9120cdfd1ae51fb7) Remove unused TemplateVariableDialog.tsx ### 📊 Changes **29 files changed** (+455 additions, -151 deletions) <details> <summary>View changed files</summary> 📝 `package-lock.json` (+19 -2) 📝 `package.json` (+1 -0) 📝 `packages/plugin-runtime-types/package.json` (+1 -1) 📝 `packages/plugin-runtime-types/src/bindings/gen_events.ts` (+10 -4) 📝 `packages/plugin-runtime-types/src/plugins/Context.ts` (+4 -1) 📝 `packages/plugin-runtime/src/PluginInstance.ts` (+52 -22) ➕ `plugins/template-function-ctx/package.json` (+12 -0) ➕ `plugins/template-function-ctx/src/index.ts` (+30 -0) ➕ `plugins/template-function-ctx/tsconfig.json` (+3 -0) 📝 `plugins/template-function-json/src/index.ts` (+0 -1) 📝 `plugins/template-function-prompt/package.json` (+4 -1) 📝 `plugins/template-function-prompt/src/index.ts` (+169 -20) 📝 `src-tauri/src/lib.rs` (+2 -1) 📝 `src-tauri/src/plugin_events.rs` (+25 -1) 📝 `src-tauri/yaak-plugins/bindings/gen_events.ts` (+10 -4) 📝 `src-tauri/yaak-plugins/src/events.rs` (+37 -0) 📝 `src-tauri/yaak-plugins/src/native_template_functions.rs` (+3 -1) 📝 `src-web/commands/commands.tsx` (+0 -1) 📝 `src-web/components/DynamicForm.tsx` (+3 -3) 📝 `src-web/components/RequestMethodDropdown.tsx` (+0 -1) _...and 9 more files_ </details> ### 📄 Description - Add storage options to `prompt.text()` - Add `window.(requestId|environmentId|workspaceId)` plugin APIs - Add `window.request()` etc template functions - Add new `previewType` (`live | click | never`) to template function definition - Add new Refresh icon to the template function dialog preview <img width="2092" height="1362" alt="CleanShot 2025-11-14 at 08 43 14@2x" src="https://github.com/user-attachments/assets/04b74697-6d54-4eba-88ce-770b476c665a" /> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 07:19:56 +01:00
adam closed this issue 2025-12-29 07:19:56 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/yaak#223