Skip to content

feat(workbench): add built-in quick launcher tools - #6755

Draft
ARE404 wants to merge 10 commits into
apache:rust-previewfrom
ARE404:feat/quick-launcher-tools
Draft

ARE404 wants to merge 10 commits into
apache:rust-previewfrom
ARE404:feat/quick-launcher-tools

Conversation

@ARE404

@ARE404 ARE404 commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds the remaining built-in quick launcher tools as ordinary plugins, on top of the calculator contract from #6743. Each tool is its own UI package under plugins/application, on by default and switchable under Settings > Plugins.

Tool Trigger Return
Symbols sym, symbol, 符号 + term Copy the character and close
Quick library: snippets, notes, links Item name; notes also search full text via note; name text fills {query} in a link Copy and close, or open the link
Applications (macOS) App name Open
File search (macOS) f, file, 文件 + at least 2 characters Open
Clipboard history (macOS) cb, clipboard, 剪贴板 Copy and close
Screen region (macOS) screenshot, capture, 截图 Close the popup, select a region, copy the image

The launcher now lists all tools in a scroll area showing 8 rows, keeps the selected row visible and pins Ask Maka below the list. Quick library content is managed on its own settings page; the popup only searches and acts, and stays a single layer.

The native parts are in-process calls on ApplicationHost, built with the normal Cargo and Maka.app flow. There is no helper binary, legacy plugin runtime, import-legacy.mjs or migration. Commits are split per tool to make review easier.

Refs #6707

Review focus

  • products/maka/workbench/src/bindings/quick_tools.rs: mdfind, open and screencapture are macOS system tools started from Rust. File search is limited to the home folder, skips ~/Library and dot folders, and is bounded by a 4 s timeout, 256 KB of output and 6 results.
  • Clipboard history polls NSPasteboard.changeCount once a second, skips concealed, transient and auto-generated content and text over 100000 bytes, keeps 50 entries and is memory-only.
  • Tools appear in composition order with a limit per tool. There is no global ranking across tools.
  • Known limits: applications match bundle file names, so localized app names do not match. Symbols have no icons, and Traditional Chinese input searches the Simplified terms.

Verification

  • just typecheck and just build pass.
  • node --test products/maka/workbench/tests/*.test.mjs: 120 pass, 0 fail, including 8 new quick tool behavior tests.
  • npm --prefix products/maka/bundle run test, cargo test -p maka-workbench --lib quick_tools, biome format, license headers and the Rust dependency and notices checks pass.
  • macOS, real popup driven through accessibility tools, with a local patch keeping the popup open on launch (not included here):
    • sym lists symbols, and Down scrolls the list to keep the selection visible.
    • Saving, editing and two-step deleting library items works, and items survive a restart. A javascript: link is rejected.
    • Return on a snippet copies it (confirmed with pbpaste) and closes the popup.
    • <link name> hello world shows a link row, and Return closes the popup.
    • Calculator shows the app, and Return launches it and closes the popup.
    • f readme lists home folder results without ~/Library. cb lists text copied after launch. 截图 shows the capture row. hello shows no tool rows.

Not run:

  • Completing a region capture, including the popup closing before selection.
  • Return on a file result. It uses the same open_local_path call as applications.
  • The URL the browser received for a link. Expansion is covered by tests only.
  • Skipping concealed clipboard content in practice.
  • Windows and Linux, where the native tools are not offered.

Observed: the Quick Library entry sits at the top of the Settings rail, above Connections and Models. I left the rail order alone.

AI use

Select exactly one:

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope: Claude Code helped with implementation and debugging under the author's direction.

Checklist

  • Tests cover the change and fail without it (parsing, ranking and native filtering are covered by tests, popup behavior was verified manually)
  • Format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No

@ARE404
ARE404 marked this pull request as draft November 10, 2026 14:54
Tools now hand the launcher their results and entries instead of drawing
their own rows, so results from every tool rank together. A blank query
shows Maka Bot, recommendations from local usage and one entry per tool;
choosing an entry types its keyword into the single input. Selected
rows name their Return action in a footer.

Usage is stored locally, bounded, and only for applications, library
items and symbols. The panel opens where a 400pt window would center and
keeps its top edge as results change its height.
Application rows load each app's icon from AppKit on demand, only for
rows on screen, and keep the generic glyph until it arrives.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant