- Voice (Beta): talk to LU and hear it answer - Computer control (Beta): a model works in the apps you approve, off by default - Local models with image input download with their image part - Create in chat (Beta): ask for an image or a clip in a Cloud chat - Ten more chat models on LU Cloud - A running task says what it is doing, and dialogs have a new look - The Linux packages carry the voice engine - Ten security fixes in the new features - A microphone field in the settings, and seven fixes from user reports Co-authored-by: Alan Vo <101240385+ALANDVO@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
50 lines
1.8 KiB
TypeScript
50 lines
1.8 KiB
TypeScript
import type { Connect } from 'vite'
|
|
import type { RouteMount } from './routes'
|
|
|
|
/**
|
|
* Computer use sees and controls the screen from the Rust process
|
|
* (src-tauri/src/commands/computer.rs). The plain Vite dev server has no Rust
|
|
* process and must never grow a second way to move the mouse, so every
|
|
* computer endpoint answers with an honest HTTP 501 and a sentence. The
|
|
* wrappers in src/api/computer.ts already refuse before they get here; these
|
|
* are the backstop for a caller that goes around them.
|
|
*/
|
|
export const COMPUTER_STUB_PATHS = [
|
|
'/local-api/computer-status',
|
|
'/local-api/computer-chat-ask',
|
|
'/local-api/computer-chat-answer',
|
|
'/local-api/computer-session-begin',
|
|
'/local-api/computer-session-allow-app',
|
|
'/local-api/computer-session-revoke-app',
|
|
'/local-api/computer-session-set-autonomous',
|
|
'/local-api/computer-session-end',
|
|
'/local-api/computer-stop',
|
|
'/local-api/computer-request-attention',
|
|
'/local-api/computer-guard',
|
|
'/local-api/computer-windows',
|
|
'/local-api/computer-screen',
|
|
'/local-api/computer-action',
|
|
'/local-api/computer-tree',
|
|
'/local-api/computer-permissions',
|
|
'/local-api/computer-permission-request',
|
|
'/local-api/computer-permission-reset',
|
|
'/local-api/computer-pause',
|
|
'/local-api/computer-takeover-answer',
|
|
'/local-api/computer-watch',
|
|
'/local-api/computer-surface',
|
|
'/local-api/computer-surface-corner',
|
|
]
|
|
|
|
export function registerComputerStubs(routes: RouteMount): void {
|
|
const body = JSON.stringify({
|
|
error: 'Computer control needs the installed desktop app. Use `npm run tauri:dev` to run it in development.',
|
|
devModeOnly: true,
|
|
ok: false,
|
|
})
|
|
const stub: Connect.SimpleHandleFunction = (_req, res) => {
|
|
res.writeHead(501, { 'Content-Type': 'application/json' })
|
|
res.end(body)
|
|
}
|
|
for (const path of COMPUTER_STUB_PATHS) routes.use(path, stub)
|
|
}
|