mirror of
https://github.com/arsvendg/Stirling-PDF.git
synced 2026-07-16 03:20:46 +02:00
feat: add Agents UI to proprietary right sidebar (#6454)
Update UI to include agents Run `task dev:all` to test
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
import type { AxiosInstance, InternalAxiosRequestConfig } from "axios";
|
||||
import { alert } from "@app/components/toast";
|
||||
import { setupApiInterceptors as coreSetup } from "@core/services/apiClientSetup";
|
||||
import {
|
||||
setupApiInterceptors as coreSetup,
|
||||
getAuthHeaders,
|
||||
} from "@core/services/apiClientSetup";
|
||||
|
||||
export { getAuthHeaders };
|
||||
import { tauriBackendService } from "@app/services/tauriBackendService";
|
||||
import { createBackendNotReadyError } from "@app/constants/backendErrors";
|
||||
import { operationRouter } from "@app/services/operationRouter";
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { invoke, isTauri } from "@tauri-apps/api/core";
|
||||
import { generateId } from "@app/utils/generateId";
|
||||
import { listen } from "@tauri-apps/api/event";
|
||||
import { open as shellOpen } from "@tauri-apps/plugin-shell";
|
||||
import { connectionModeService } from "@app/services/connectionModeService";
|
||||
@@ -1008,7 +1009,7 @@ export class AuthService {
|
||||
serverUrl: string,
|
||||
): Promise<UserInfo> {
|
||||
// Generate and store nonce for CSRF protection
|
||||
const nonce = crypto.randomUUID();
|
||||
const nonce = generateId();
|
||||
sessionStorage.setItem("oauth_nonce", nonce);
|
||||
console.log(
|
||||
"[Desktop AuthService] Generated OAuth nonce for CSRF protection",
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { invoke } from "@tauri-apps/api/core";
|
||||
import { generateId } from "@app/utils/generateId";
|
||||
|
||||
function sanitizeFileName(fileName: string) {
|
||||
const cleaned = fileName.replace(/[^A-Za-z0-9._-]+/g, "_");
|
||||
@@ -40,7 +41,7 @@ export async function printPdfNatively(
|
||||
|
||||
const tempPath = await join(
|
||||
await tempDir(),
|
||||
`stirling-print-${crypto.randomUUID()}-${sanitizeFileName(fileName)}`,
|
||||
`stirling-print-${generateId()}-${sanitizeFileName(fileName)}`,
|
||||
);
|
||||
|
||||
await writeFile(tempPath, new Uint8Array(await source.arrayBuffer()));
|
||||
|
||||
Reference in New Issue
Block a user