Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clipboard Access fails when non-plaintext is copied #1

Open
Maclean-D opened this issue Sep 6, 2024 · 0 comments
Open

Clipboard Access fails when non-plaintext is copied #1

Maclean-D opened this issue Sep 6, 2024 · 0 comments
Labels
Expiremental Related to experimental features

Comments

@Maclean-D
Copy link
Owner

Maclean-D commented Sep 6, 2024

Copying non-plaintext when Clipboard Access is on throws this error:

Error: Command failed with exit code 101: C:\Users\mac\Documents\GitHub\three-assistant-glass\node_modules\clipboardy\fallbacks\windows\clipboard_x86_64.exe --paste
thread 'main' panicked at 'Error: Could not paste from clipboard: Error { repr: Os { code: 1168, message: "Element not found." } }', src\libcore\result.rs:906:4
note: Run with `RUST_BACKTRACE=1` for a backtrace.

    at makeError (file:///C:/Users/mac/Documents/GitHub/three-assistant-glass/node_modules/execa/lib/error.js:60:11)
    at handlePromise (file:///C:/Users/mac/Documents/GitHub/three-assistant-glass/node_modules/execa/index.js:124:26)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Object.paste (file:///C:/Users/mac/Documents/GitHub/three-assistant-glass/node_modules/clipboardy/lib/windows.js:16:20) {
  shortMessage: 'Command failed with exit code 101: C:\\Users\\mac\\Documents\\GitHub\\three-assistant-glass\\node_modules\\clipboardy\\fallbacks\\windows\\clipboard_x86_64.exe --paste',
  command: 'C:\\Users\\mac\\Documents\\GitHub\\three-assistant-glass\\node_modules\\clipboardy\\fallbacks\\windows\\clipboard_x86_64.exe --paste',
  escapedCommand: '"C:\\Users\\mac\\Documents\\GitHub\\three-assistant-glass\\node_modules\\clipboardy\\fallbacks\\windows\\clipboard_x86_64.exe" --paste',
  exitCode: 101,
  signal: undefined,
  signalDescription: undefined,
  stdout: '',
  stderr: `thread 'main' panicked at 'Error: Could not paste from clipboard: Error { repr: Os { code: 1168, message: "Element not found." } }', src\\libcore\\result.rs:906:4\n` +
    'note: Run with `RUST_BACKTRACE=1` for a backtrace.\n',
  cwd: 'C:\\Users\\mac\\Documents\\GitHub\\three-assistant-glass',
  failed: true,
  timedOut: false,
  isCanceled: false,
  killed: false
}

Possible solutions from most to least favorable:

1. Add support for text and images

When plaintext or an image is copied, send it to Vapi. If something else is copied throw an alert that says that file type isn't supported.

2. Process images with Google Vision API

When an image is copied send to Google Vision for a text description, then send the text description to Vapi. Google Vision for images should also be optional. Ideally only resort to this if Vapi won't take images.

3. Only support plaintext

If non-plaintext is copied throw an alert that says it's not supported and don't try to process it or send it anywhere. Ideally only resort to this if there's no clipboard library that supports images.

@Maclean-D Maclean-D added the Expiremental Related to experimental features label Sep 6, 2024
Maclean-D pushed a commit that referenced this issue Sep 7, 2024
Initial support for Looking Glass SDK
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Expiremental Related to experimental features
Projects
None yet
Development

No branches or pull requests

1 participant