@ryan_nookpi/pi-extension-clipboard 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -5
- package/index.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,15 +1,25 @@
|
|
|
1
1
|
# @ryan_nookpi/pi-extension-clipboard
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This extension lets pi copy generated text directly to your system clipboard.
|
|
4
|
+
|
|
5
|
+
It is especially handy for reply drafts, commit messages, PR descriptions, SQL queries, and other text you want to paste right away.
|
|
4
6
|
|
|
5
7
|
## Install
|
|
6
8
|
|
|
7
9
|
```bash
|
|
8
|
-
pi install /Users/creatrip/Documents/pi-extension/packages/clipboard
|
|
9
10
|
pi install npm:@ryan_nookpi/pi-extension-clipboard
|
|
10
11
|
```
|
|
11
12
|
|
|
12
|
-
##
|
|
13
|
+
## Great for
|
|
14
|
+
|
|
15
|
+
- "Write a reply draft and put it in my clipboard"
|
|
16
|
+
- copying long outputs without selecting them manually
|
|
17
|
+
- using clipboard copy from terminal or SSH-based workflows
|
|
18
|
+
|
|
19
|
+
## Example prompts
|
|
20
|
+
|
|
21
|
+
- "Draft a Slack reply and copy it to my clipboard."
|
|
22
|
+
- "Put this SQL query in my clipboard."
|
|
23
|
+
- "Write a PR description and copy it for me."
|
|
13
24
|
|
|
14
|
-
|
|
15
|
-
- `./index.ts` entry
|
|
25
|
+
After installation, pi can use the `copy_to_clipboard` tool to copy results instantly.
|
package/index.ts
CHANGED
|
@@ -50,7 +50,7 @@ export default function clipboardExtension(pi: ExtensionAPI): void {
|
|
|
50
50
|
}),
|
|
51
51
|
}),
|
|
52
52
|
async execute(_toolCallId, params, _signal, _onUpdate, ctx) {
|
|
53
|
-
const { text } = params
|
|
53
|
+
const { text } = params;
|
|
54
54
|
|
|
55
55
|
if (!text || text.trim().length === 0) {
|
|
56
56
|
return {
|