fix: resolve the weird path issues from windows <-> WSL (#106)
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 1m18s
CI / Lint & Test (push) Has been cancelled
CI / Build Linux (push) Has been cancelled
CI / Build Windows (cross-compile) (push) Has been cancelled

### Explanation

_No response_

### Issue

_No response_

### Attestations

- [ ] I have read and agree to the [Code of Conduct](https://docs.nhcarrigan.com/community/coc/)
- [ ] I have read and agree to the [Community Guidelines](https://docs.nhcarrigan.com/community/guide/).
- [ ] My contribution complies with the [Contributor Covenant](https://docs.nhcarrigan.com/dev/covenant/).

### Dependencies

- [ ] I have pinned the dependencies to a specific patch version.

### Style

- [ ] I have run the linter and resolved any errors.
- [ ] My pull request uses an appropriate title, matching the conventional commit standards.
- [ ] My scope of feat/fix/chore/etc. correctly matches the nature of changes in my pull request.

### Tests

- [ ] My contribution adds new code, and I have added tests to cover it.
- [ ] My contribution modifies existing code, and I have updated the tests to reflect these changes.
- [ ] All new and existing tests pass locally with my changes.
- [ ] Code coverage remains at or above the configured threshold.

### Documentation

_No response_

### Versioning

_No response_

Reviewed-on: #106
Co-authored-by: Naomi Carrigan <commits@nhcarrigan.com>
Co-committed-by: Naomi Carrigan <commits@nhcarrigan.com>
This commit was merged in pull request #106.
This commit is contained in:
2026-02-05 19:21:36 -08:00
committed by Naomi Carrigan
parent a72f2afaff
commit 479652b69e
4 changed files with 648 additions and 71 deletions
+6 -3
View File
@@ -447,11 +447,12 @@ User: ${formattedMessage}`;
try {
const arrayBuffer = await file.arrayBuffer();
const bytes = Array.from(new Uint8Array(arrayBuffer));
savedPath = await invoke<string>("save_temp_file", {
const result = await invoke<{ path: string; filename: string }>("save_temp_file", {
conversationId,
filename,
data: bytes,
});
savedPath = result.path;
} catch (error) {
console.error("Failed to save dropped file to temp:", error);
savedPath = file.name;
@@ -585,11 +586,12 @@ User: ${formattedMessage}`;
try {
const arrayBuffer = await file.arrayBuffer();
const bytes = Array.from(new Uint8Array(arrayBuffer));
savedPath = await invoke<string>("save_temp_file", {
const result = await invoke<{ path: string; filename: string }>("save_temp_file", {
conversationId,
filename,
data: bytes,
});
savedPath = result.path;
} catch (error) {
console.error("Failed to save pasted file to temp:", error);
}
@@ -647,11 +649,12 @@ User: ${formattedMessage}`;
try {
const arrayBuffer = await blob.arrayBuffer();
const bytes = Array.from(new Uint8Array(arrayBuffer));
savedPath = await invoke<string>("save_temp_file", {
const result = await invoke<{ path: string; filename: string }>("save_temp_file", {
conversationId,
filename,
data: bytes,
});
savedPath = result.path;
} catch (error) {
console.error("Failed to save clipboard image to temp:", error);
}