linux/wayland: Add support for pasting images (#17671)
Release Notes: - You can now paste images into the Assistant Panel to include them as context on Linux wayland
This commit is contained in:
parent
eb9fd62a90
commit
837756198f
3 changed files with 106 additions and 65 deletions
|
@ -1799,10 +1799,11 @@ impl Dispatch<wl_data_device::WlDataDevice, ()> for WaylandClientStatePtr {
|
|||
let fd = pipe.read;
|
||||
drop(pipe.write);
|
||||
|
||||
let read_task = state
|
||||
.common
|
||||
.background_executor
|
||||
.spawn(async { unsafe { read_fd(fd) } });
|
||||
let read_task = state.common.background_executor.spawn(async {
|
||||
let buffer = unsafe { read_fd(fd)? };
|
||||
let text = String::from_utf8(buffer)?;
|
||||
anyhow::Ok(text)
|
||||
});
|
||||
|
||||
let this = this.clone();
|
||||
state
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue