mirror of
https://github.com/open-webui/computer.git
synced 2026-11-22 21:50:43 -05:00
refac
This commit is contained in:
1 parent
556db8aebf
commit
6ac31ebe74
5 files changed
+166
-157
No files matched your search
@@ -55,23 +55,27 @@ Most tunnels forward to `localhost`, so the default `cptr run` works. If your tu
|
||||
|
||||
Or skip networking entirely and connect a [messaging bot](#messaging-bots) instead.
|
||||
|
||||
## What you get
|
||||
## The Whole Machine
|
||||
|
||||
Open WebUI Computer is the real workstation surface: files, shell, git state, workspaces, chats, tools, and sessions stay together wherever you open it.
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
| 📁 **File browser** | Navigate, create, rename, upload, drag and drop. Icons by type, sizes at a glance. |
|
||||
| ⌨️ **Terminal** | Full shell in the browser. Run your tools, your scripts, or your favourite coding agent. |
|
||||
| 🔀 **Git** | Stage, commit, diff, branch, push. Visual changes view. No command line required. |
|
||||
| 📁 **Real files** | Navigate, create, rename, upload, drag and drop. Icons by type, sizes at a glance. |
|
||||
| ✏️ **Editor** | Syntax-highlighted editing with tabs. Open multiple files side by side. |
|
||||
| 🔀 **Git** | Stage, commit, diff, branch, push. Visual changes view. No command line required. |
|
||||
| ⌨️ **Terminal** | Full shell in the browser. Run your tools, your scripts, or your favourite coding agent. |
|
||||
| 🔄 **Sessions persist** | Terminal keeps running when you close the tab. Come back on any device. |
|
||||
| 🗂️ **Tabs** | Open terminals, files, chats, and tools in separate tabs. Rearrange or split your layout. |
|
||||
| 📂 **Workspaces** | Multiple projects, one instance. Switch without losing your place. |
|
||||
| 🔍 **Search** | Find files by name, search across file contents and chat history. ⌘K to find anything. |
|
||||
| 📱 **Mobile-first** | Not a desktop UI made smaller. Built for the screen in your pocket. |
|
||||
| 🔄 **Sessions persist** | Terminal keeps running when you close the tab. Come back on any device. |
|
||||
|
||||
## AI agent
|
||||
|
||||
Bring your own API key (OpenAI, Anthropic, Ollama, or any OpenAI-compatible endpoint), or connect a coding agent you already subscribe to.
|
||||
AI that works where your work actually lives.
|
||||
|
||||
Bring your own API key (OpenAI, Anthropic, Ollama, or any OpenAI-compatible endpoint), or connect a coding agent you already subscribe to. It can read the workspace, edit files, run commands, browse the web, use tools, automate recurring work, and spin up parallel sub-agents on the same machine.
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
@@ -95,7 +99,7 @@ Bring your own API key (OpenAI, Anthropic, Ollama, or any OpenAI-compatible endp
|
||||
|
||||
## Coding agents
|
||||
|
||||
Connect a coding agent as a native backend and use the subscription you already pay for. No separate API key needed.
|
||||
Use the subscriptions you already pay for as native backends on your own machine. No separate API key needed.
|
||||
|
||||
**Codex** · **Claude Code** · **Cursor** · **Grok** · **OpenCode** · **Cline**
|
||||
|
||||
@@ -105,15 +109,15 @@ Prefer to run agents yourself? Any terminal agent (Gemini CLI, Kilo Code, Pi, an
|
||||
|
||||
## Messaging bots
|
||||
|
||||
Connect the AI to your chat apps. Full tool access, streaming responses, conversations synced back to the web UI.
|
||||
Message your computer from wherever you are. Connect the AI to your chat apps with full tool access, streaming responses, and conversations synced back to the web UI.
|
||||
|
||||
**Telegram** · **Discord** · **Slack** · **WhatsApp** · **Signal**
|
||||
|
||||
Message your computer from wherever you are. Ask it to check a build, push a fix, or explain a file. Switch workspaces with `/workspace`, start fresh with `/new`.
|
||||
Ask it to check a build, push a fix, or explain a file. Switch workspaces with `/workspace`, start fresh with `/new`.
|
||||
|
||||
## Gateway API
|
||||
|
||||
Open WebUI Computer exposes an OpenAI-compatible API (`/v1/chat/completions`). Any client that speaks OpenAI, including [Open WebUI](https://github.com/open-webui/open-webui), can use each Open WebUI Computer workspace as a model with full agent capabilities: file access, terminal, web search, tools.
|
||||
Turn each workspace into an OpenAI-compatible agent model with real machine access. Open WebUI Computer exposes `/v1/chat/completions`, so any client that speaks OpenAI, including [Open WebUI](https://github.com/open-webui/open-webui), can use a workspace with full agent capabilities: file access, terminal, web search, tools.
|
||||
|
||||
## More
|
||||
|
||||
|
||||
@@ -1,106 +0,0 @@
|
||||
<script lang="ts">
|
||||
import { t } from '$lib/i18n';
|
||||
import { appVersion, showChangelog, updateAvailable, latestVersion } from '$lib/stores';
|
||||
|
||||
const REPO_URL = 'https://github.com/open-webui/computer';
|
||||
const SHARE_TEXT = 'Check out Computer. Your computer, from anywhere.';
|
||||
|
||||
const shareLinks = [
|
||||
{
|
||||
label: 'X',
|
||||
href: `https://x.com/intent/tweet?text=${encodeURIComponent(SHARE_TEXT)}&url=${encodeURIComponent(REPO_URL)}`
|
||||
},
|
||||
{
|
||||
label: 'Reddit',
|
||||
href: `https://reddit.com/submit?url=${encodeURIComponent(REPO_URL)}&title=${encodeURIComponent(SHARE_TEXT)}`
|
||||
},
|
||||
{
|
||||
label: 'LinkedIn',
|
||||
href: `https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(REPO_URL)}`
|
||||
}
|
||||
];
|
||||
|
||||
let copied = $state(false);
|
||||
|
||||
function copyLink() {
|
||||
navigator.clipboard.writeText(REPO_URL);
|
||||
copied = true;
|
||||
setTimeout(() => (copied = false), 2000);
|
||||
}
|
||||
</script>
|
||||
|
||||
<h2 class="text-sm font-medium text-gray-900 dark:text-white mb-4">
|
||||
{$t('about.title')}
|
||||
</h2>
|
||||
|
||||
<div>
|
||||
<div class="flex items-baseline gap-2">
|
||||
<a
|
||||
href="https://github.com/open-webui/computer"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
class="text-xs font-semibold text-gray-900 dark:text-white hover:underline">Computer</a
|
||||
>
|
||||
{#if $appVersion}
|
||||
<button
|
||||
onclick={() => showChangelog.set(true)}
|
||||
class="text-[0.6875rem] text-gray-400 dark:text-gray-600 hover:text-gray-500 dark:hover:text-gray-400 font-mono hover:underline cursor-pointer"
|
||||
>v{$appVersion}</button
|
||||
>
|
||||
{/if}
|
||||
{#if $updateAvailable}
|
||||
<span class="text-[0.6875rem] text-gray-300 dark:text-gray-600">·</span>
|
||||
<a
|
||||
href="https://github.com/open-webui/computer/releases"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
class="text-[0.6875rem] text-gray-400 dark:text-gray-500 hover:text-gray-600 dark:hover:text-gray-300 transition-colors"
|
||||
>{$t('about.updateAvailable', { version: $latestVersion })}</a
|
||||
>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<p class="text-[0.8125rem] text-gray-500 mt-0.5 mb-4">{$t('app.tagline')}</p>
|
||||
|
||||
<h3 class="text-xs text-gray-400 dark:text-gray-600 mb-1">
|
||||
{$t('about.license')}
|
||||
</h3>
|
||||
<p class="text-[0.6875rem] text-gray-500 leading-relaxed font-mono whitespace-pre-line">
|
||||
<a
|
||||
href="https://github.com/open-webui/computer/blob/main/LICENSE"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
class="underline hover:text-gray-700 dark:hover:text-gray-300">{$t('about.licenseName')}</a
|
||||
>
|
||||
|
||||
<br />
|
||||
{$t('about.copyright')}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="flex items-center gap-1.5 pt-6">
|
||||
<span class="text-[0.6875rem] text-gray-400 dark:text-gray-600 mr-1">{$t('about.share')}</span>
|
||||
{#each shareLinks as link, i}
|
||||
{#if i > 0}
|
||||
<span class="text-[0.6875rem] text-gray-200 dark:text-gray-700">·</span>
|
||||
{/if}
|
||||
<a
|
||||
href={link.href}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
class="text-[0.6875rem] text-gray-400 hover:text-gray-600 dark:hover:text-gray-500 transition-colors"
|
||||
>{link.label}</a
|
||||
>
|
||||
{/each}
|
||||
<span class="text-[0.6875rem] text-gray-200 dark:text-gray-700">·</span>
|
||||
<button
|
||||
onclick={copyLink}
|
||||
class="text-[0.6875rem] text-gray-400 hover:text-gray-600 dark:hover:text-gray-500 transition-colors cursor-pointer"
|
||||
>
|
||||
{copied ? $t('about.copied') : $t('about.copyLink')}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<p class="text-[0.6875rem] text-gray-300 dark:text-gray-700 pt-4">
|
||||
{$t('about.createdBy')}
|
||||
</p>
|
||||
@@ -1,15 +1,130 @@
|
||||
<script lang="ts">
|
||||
import { streamingBehavior, showUpdateToastPref } from '$lib/stores';
|
||||
import {
|
||||
appVersion,
|
||||
showChangelog,
|
||||
streamingBehavior,
|
||||
showUpdateToastPref,
|
||||
updateAvailable,
|
||||
latestVersion
|
||||
} from '$lib/stores';
|
||||
import type { StreamingBehavior } from '$lib/stores';
|
||||
import { t, locale, changeLocale, supportedLocales } from '$lib/i18n';
|
||||
import { session } from '$lib/session';
|
||||
import ToggleSwitch from '../common/ToggleSwitch.svelte';
|
||||
|
||||
interface Props {
|
||||
showPwaSettings?: boolean;
|
||||
}
|
||||
|
||||
let { showPwaSettings = false }: Props = $props();
|
||||
|
||||
const REPO_URL = 'https://github.com/open-webui/computer';
|
||||
const SHARE_TEXT = 'Check out Computer. Your computer, from anywhere.';
|
||||
|
||||
const shareLinks = [
|
||||
{
|
||||
label: 'X',
|
||||
href: `https://x.com/intent/tweet?text=${encodeURIComponent(SHARE_TEXT)}&url=${encodeURIComponent(REPO_URL)}`
|
||||
},
|
||||
{
|
||||
label: 'Reddit',
|
||||
href: `https://reddit.com/submit?url=${encodeURIComponent(REPO_URL)}&title=${encodeURIComponent(SHARE_TEXT)}`
|
||||
},
|
||||
{
|
||||
label: 'LinkedIn',
|
||||
href: `https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(REPO_URL)}`
|
||||
}
|
||||
];
|
||||
|
||||
let copied = $state(false);
|
||||
let resetting = $state(false);
|
||||
|
||||
function copyLink() {
|
||||
navigator.clipboard.writeText(REPO_URL);
|
||||
copied = true;
|
||||
setTimeout(() => (copied = false), 2000);
|
||||
}
|
||||
|
||||
async function resetPwa() {
|
||||
resetting = true;
|
||||
|
||||
try {
|
||||
if ('serviceWorker' in navigator) {
|
||||
const registrations = await navigator.serviceWorker.getRegistrations();
|
||||
await Promise.all(registrations.map((registration) => registration.unregister()));
|
||||
}
|
||||
|
||||
if ('caches' in window) {
|
||||
const keys = await caches.keys();
|
||||
await Promise.all(
|
||||
keys.filter((key) => key.startsWith('cptr-')).map((key) => caches.delete(key))
|
||||
);
|
||||
}
|
||||
} finally {
|
||||
location.reload();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="flex flex-col h-full">
|
||||
<div class="flex-1 min-h-0 overflow-y-auto scrollbar-hover pr-1.5 -mr-1.5">
|
||||
<h2 class="text-sm font-medium text-gray-900 dark:text-white mb-4">{$t('general.title')}</h2>
|
||||
|
||||
<div class="mb-5">
|
||||
<div class="flex items-baseline gap-2">
|
||||
<a
|
||||
href={REPO_URL}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
class="text-xs font-semibold text-gray-900 dark:text-white hover:underline">Computer</a
|
||||
>
|
||||
{#if $appVersion}
|
||||
<button
|
||||
onclick={() => showChangelog.set(true)}
|
||||
class="text-[0.6875rem] text-gray-400 dark:text-gray-600 hover:text-gray-500 dark:hover:text-gray-400 font-mono hover:underline cursor-pointer"
|
||||
>v{$appVersion}</button
|
||||
>
|
||||
{/if}
|
||||
{#if $updateAvailable}
|
||||
<span class="text-[0.6875rem] text-gray-300 dark:text-gray-600">·</span>
|
||||
<a
|
||||
href="https://github.com/open-webui/computer/releases"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
class="text-[0.6875rem] text-gray-400 dark:text-gray-500 hover:text-gray-600 dark:hover:text-gray-300 transition-colors"
|
||||
>{$t('about.updateAvailable', { version: $latestVersion })}</a
|
||||
>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<p class="text-[0.8125rem] text-gray-500 mt-0.5 mb-2">{$t('app.tagline')}</p>
|
||||
|
||||
<div class="flex items-center gap-1.5">
|
||||
<span class="text-[0.6875rem] text-gray-400 dark:text-gray-600 mr-1"
|
||||
>{$t('about.share')}</span
|
||||
>
|
||||
{#each shareLinks as link, i}
|
||||
{#if i > 0}
|
||||
<span class="text-[0.6875rem] text-gray-200 dark:text-gray-700">·</span>
|
||||
{/if}
|
||||
<a
|
||||
href={link.href}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
class="text-[0.6875rem] text-gray-400 hover:text-gray-600 dark:hover:text-gray-500 transition-colors"
|
||||
>{link.label}</a
|
||||
>
|
||||
{/each}
|
||||
<span class="text-[0.6875rem] text-gray-200 dark:text-gray-700">·</span>
|
||||
<button
|
||||
onclick={copyLink}
|
||||
class="text-[0.6875rem] text-gray-400 hover:text-gray-600 dark:hover:text-gray-500 transition-colors cursor-pointer"
|
||||
>
|
||||
{copied ? $t('about.copied') : $t('about.copyLink')}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3 class="text-xs text-gray-400 dark:text-gray-600 mb-2">{$t('general.language')}</h3>
|
||||
<select
|
||||
class="w-full max-w-[12.5rem] bg-transparent text-[0.8125rem] text-gray-700 dark:text-gray-300 outline-none py-1 cursor-pointer"
|
||||
@@ -51,5 +166,40 @@
|
||||
<p class="text-[0.6875rem] text-gray-400 dark:text-gray-600 mt-1">
|
||||
{$streamingBehavior === 'queue' ? $t('general.queueDesc') : $t('general.interruptDesc')}
|
||||
</p>
|
||||
|
||||
<div class="pt-5">
|
||||
<h3 class="text-xs text-gray-400 dark:text-gray-600 mb-1">
|
||||
{$t('about.license')}
|
||||
</h3>
|
||||
<p class="text-[0.6875rem] text-gray-500 leading-relaxed font-mono whitespace-pre-line">
|
||||
<a
|
||||
href="https://github.com/open-webui/computer/blob/main/LICENSE"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
class="underline hover:text-gray-700 dark:hover:text-gray-300"
|
||||
>{$t('about.licenseName')}</a
|
||||
>
|
||||
|
||||
<br />
|
||||
{$t('about.copyright')}
|
||||
</p>
|
||||
<p class="text-[0.6875rem] text-gray-300 dark:text-gray-700 pt-4">
|
||||
{$t('about.createdBy')}
|
||||
</p>
|
||||
|
||||
{#if showPwaSettings}
|
||||
<h3 class="text-xs text-gray-400 dark:text-gray-600 mb-2 mt-5">{$t('pwa.resetTitle')}</h3>
|
||||
<button
|
||||
class="text-[0.8125rem] text-gray-500 dark:text-gray-500 hover:text-gray-900 dark:hover:text-white transition-colors disabled:opacity-40 disabled:pointer-events-none"
|
||||
onclick={resetPwa}
|
||||
disabled={resetting}
|
||||
>
|
||||
{resetting ? $t('pwa.resetting') : $t('pwa.reset')}
|
||||
</button>
|
||||
<p class="text-[0.6875rem] text-gray-400 dark:text-gray-600 mt-1">
|
||||
{$t('pwa.resetDesc')}
|
||||
</p>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -22,28 +22,6 @@
|
||||
(e.currentTarget as HTMLSelectElement).value as PwaPreferences['importDestination']
|
||||
);
|
||||
}
|
||||
|
||||
let resetting = $state(false);
|
||||
|
||||
async function resetPwa() {
|
||||
resetting = true;
|
||||
|
||||
try {
|
||||
if ('serviceWorker' in navigator) {
|
||||
const registrations = await navigator.serviceWorker.getRegistrations();
|
||||
await Promise.all(registrations.map((registration) => registration.unregister()));
|
||||
}
|
||||
|
||||
if ('caches' in window) {
|
||||
const keys = await caches.keys();
|
||||
await Promise.all(
|
||||
keys.filter((key) => key.startsWith('cptr-')).map((key) => caches.delete(key))
|
||||
);
|
||||
}
|
||||
} finally {
|
||||
location.reload();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="flex flex-col h-full">
|
||||
@@ -80,17 +58,5 @@
|
||||
updatePref('importFolder', (e.currentTarget as HTMLInputElement).value || undefined)}
|
||||
/>
|
||||
{/if}
|
||||
|
||||
<h3 class="text-xs text-gray-400 dark:text-gray-600 mb-2 mt-5">{tr('pwa.resetTitle')}</h3>
|
||||
<button
|
||||
class="text-[0.8125rem] text-gray-500 dark:text-gray-500 hover:text-gray-900 dark:hover:text-white transition-colors disabled:opacity-40 disabled:pointer-events-none"
|
||||
onclick={resetPwa}
|
||||
disabled={resetting}
|
||||
>
|
||||
{resetting ? tr('pwa.resetting') : tr('pwa.reset')}
|
||||
</button>
|
||||
<p class="text-[0.6875rem] text-gray-400 dark:text-gray-600 mt-1">
|
||||
{tr('pwa.resetDesc')}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -9,7 +9,6 @@
|
||||
import PWA from './Settings/PWA.svelte';
|
||||
import Account from './Settings/Account.svelte';
|
||||
import Keyboard from './Settings/Keyboard.svelte';
|
||||
import About from './Settings/About.svelte';
|
||||
import Users from './Admin/Users.svelte';
|
||||
import Connections from './Admin/Connections.svelte';
|
||||
import Agents from './Admin/Agents.svelte';
|
||||
@@ -33,7 +32,6 @@
|
||||
| 'pwa'
|
||||
| 'keyboard'
|
||||
| 'account'
|
||||
| 'about'
|
||||
| 'users'
|
||||
| 'connections'
|
||||
| 'agents'
|
||||
@@ -86,7 +84,6 @@
|
||||
{ id: 'account', label: $t('settings.account'), icon: 'user' }
|
||||
];
|
||||
if (showPwaSettings) tabs.push({ id: 'pwa', label: 'PWA', icon: 'phone' });
|
||||
tabs.push({ id: 'about', label: $t('settings.about'), icon: 'info' });
|
||||
return tabs;
|
||||
});
|
||||
|
||||
@@ -184,7 +181,7 @@
|
||||
|
||||
<div class="flex-1 overflow-y-auto scrollbar-none min-h-0 p-4 md:px-5">
|
||||
{#if activeTab === 'general'}
|
||||
<General />
|
||||
<General {showPwaSettings} />
|
||||
{:else if activeTab === 'notifications'}
|
||||
<Notifications />
|
||||
{:else if activeTab === 'appearance'}
|
||||
@@ -197,8 +194,6 @@
|
||||
<Keyboard />
|
||||
{:else if activeTab === 'account'}
|
||||
<Account />
|
||||
{:else if activeTab === 'about'}
|
||||
<About />
|
||||
{:else if activeTab === 'users'}
|
||||
<Users />
|
||||
{:else if activeTab === 'connections'}
|
||||
|
||||
Reference in new issue
Block a user