Skip to content

Commit 7e85f4c

Browse files
authored
Merge pull request #36 from VariableThe/fix/github-action-tauri
Fix/GitHub action tauri
2 parents a592269 + abeb057 commit 7e85f4c

23 files changed

Lines changed: 36 additions & 26 deletions

CONTRIBUTING.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,11 @@ First of all, thank you for considering contributing to PaperCache!
1616
npm ci
1717
```
1818

19-
3. **Start the development server:**
19+
3. **Start the Tauri development server:**
2020
```bash
21-
npm run dev
21+
npm run tauri dev
2222
```
23+
> **Prerequisite:** A [Rust toolchain](https://rustup.rs) is required to compile the native backend.
2324
2425
## Development Guidelines
2526
- **Pull Requests Required**: Never push new features directly to the `main` branch. Always create a new branch and push your changes as a Pull Request (PR) for review.

features.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ This document outlines every feature available in the PaperCache codebase, organ
3535
- **Note Context Injection**: Type `/ctx <prompt>` instead to automatically package the entire text of the current note along with your prompt, allowing the AI to read your document before answering.
3636
- **Configurable Models & Custom Endpoints**: Easily switch out your API Key, System Prompt, API Base URL, and specific AI Model in the settings panel.
3737
- **Free Top-Tier Defaults**: PaperCache comes fully pre-configured to point to OpenRouter's free tier, using powerful models like `nvidia/nemotron-3-super-120b-a12b:free` out of the box!
38-
- **Secure API Storage**: API keys are securely encrypted at rest using your operating system's native keychain (via Electron's `safeStorage`).
38+
- **Secure API Storage**: API keys are securely encrypted at rest using your operating system's native keychain (via the Rust `keyring` crate).
3939

4040
## Desktop System Integration
4141

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"scripts": {
77
"dev": "vite",
88
"build": "tsc -b && vite build",
9+
"tauri": "tauri",
910
"lint": "eslint src --ext .ts,.tsx",
1011
"lint:fix": "eslint src --ext .ts,.tsx --fix",
1112
"format": "prettier --write src",

src-tauri/src-tauri/icons/icon.png

-198 KB
Binary file not shown.

src-tauri/src/commands/fs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ pub fn get_safe_path(id: &str) -> Result<PathBuf, String> {
2626

2727
let parent = target.parent().ok_or("Invalid path parent")?;
2828
if !parent.exists() {
29-
fs::create_dir_all(&parent).map_err(|e| e.to_string())?;
29+
fs::create_dir_all(parent).map_err(|e| e.to_string())?;
3030
}
3131
let canonical_parent = parent.canonicalize().map_err(|e| e.to_string())?;
3232

src-tauri/src/lib.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,8 @@ pub fn run() {
5858
api.prevent_close();
5959
let _ = w.hide();
6060
}
61-
tauri::WindowEvent::Focused(focused) => {
62-
if !focused && !is_dialog_open.load(Ordering::SeqCst) {
63-
let _ = w.hide();
64-
}
61+
tauri::WindowEvent::Focused(focused) if !focused && !is_dialog_open.load(Ordering::SeqCst) => {
62+
let _ = w.hide();
6563
}
6664
_ => {}
6765
}

src/assets/hero.png

-12.8 KB
Binary file not shown.

src/assets/react.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/assets/vite.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/hooks/useVariables.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@ export function useVariables() {
2121
while ((varMatch = reVar.exec(note.content)) !== null) {
2222
const name = varMatch[1]
2323
try {
24-
globals[name] = parser.evaluate(varMatch[2], globals as any)
24+
globals[name] = parser.evaluate(varMatch[2], globals as Record<string, unknown>)
2525
} catch (e) {
26+
// eslint-disable-next-line no-console
2627
console.error(`useVariables evaluation error for ${name}:`, e)
2728
globals[name] = varMatch[2].trim()
2829
}

0 commit comments

Comments
 (0)