Multiplayer agent harness for work.
web-ui: remove the admin session-log link from chat surfaces (#449)
Regan Bellefa4f3a869af
diff --git a/plugins/web-ui/src/chat.ts b/plugins/web-ui/src/chat.tsindex 35db6f6aa..ef6da3fc4 100644--- a/plugins/web-ui/src/chat.ts+++ b/plugins/web-ui/src/chat.ts@@ -81,7 +81,7 @@ import {harnessSupportsFastMode,} from "./model-options";import { browserRenderableImage, formatBytes, icon, relTime } from "./ui";-import { adminSessionLogUrl, appState, can, renderSidebarTop, switchView, syncUrlFromState } from "./shell";+import { appState, renderSidebarTop, switchView, syncUrlFromState } from "./shell";import { contextsState, scopeTitle } from "./contexts";import { openProjectPage, scopeCronCount, sessionTopbarTpl, setScopedSession } from "./session-scope";import {@@ -1129,18 +1129,6 @@ export function createChatSurface(<div class="chat-subtitle">${readOnly ? "Read-only" : detail}</div></div><div class="topbar-actions">- ${- chatState.sessionId && can("admin")- ? html`<a- class="icon-btn subtle"- title="View session log (admin)"- href=${adminSessionLogUrl(chatState.sessionId, chatState.scopeId ?? `org:${appState.me?.org ?? ""}`)}- target="_blank"- rel="noreferrer"- >${icon(ScrollText, 17)}</a- >`- : nothing- }<buttonclass="icon-btn subtle"title="Refresh conversations"diff --git a/plugins/web-ui/src/composer.ts b/plugins/web-ui/src/composer.tsindex 1e0e1a63c..65ef5a4b1 100644--- a/plugins/web-ui/src/composer.ts+++ b/plugins/web-ui/src/composer.ts@@ -11,7 +11,6 @@ import {ChevronDown,FileText,Paperclip,- ScrollText,SlidersHorizontal,Square,X,@@ -46,7 +45,7 @@ import {import { modelSupportsFastMode, setFastModeModelIds } from "./pi-models";import type { ComposerSurface, ConvCtx } from "./conv-types";import { bumpSessionActivity, dropPendingSession, renderList } from "./sessions";-import { adminSessionLogUrl, appState, can } from "./shell";+import { appState } from "./shell";import { base64ToText, bytesToBase64, insertIntoDraft, pasteChipLabel } from "./paste-text";import { clearDraft, newChatDraftKey, saveDraft } from "./drafts";@@ -447,18 +446,6 @@ export function createComposerSurface(ctx: ConvCtx): ComposerSurface {}<div class="composer-toolbar"><div class="composer-left">- ${- !ctx.pane && ctx.chat.state.sessionId && can("admin")- ? html`<a- class="icon-btn"- title="View session log (admin)"- href=${adminSessionLogUrl(ctx.chat.state.sessionId, ctx.chat.state.scopeId ?? `org:${appState.me?.org ?? ""}`)}- target="_blank"- rel="noreferrer"- >${icon(ScrollText, 18)}</a- >`- : nothing- }<inputclass="file-input"type="file"diff --git a/plugins/web-ui/src/shell.ts b/plugins/web-ui/src/shell.tsindex 645795ee9..480b69f97 100644--- a/plugins/web-ui/src/shell.ts+++ b/plugins/web-ui/src/shell.ts@@ -85,11 +85,6 @@ export const ADMIN_BASE = (() => {})();export const ADMIN_HOME_URL = `${ADMIN_BASE}/`;-export function adminSessionLogUrl(sessionId: string, scopeId: string): string {- const q = new URLSearchParams({ view: "history", scope: scopeId, session: sessionId });- return `${ADMIN_BASE}/?${q.toString()}`;-}-export function syncUrlFromState(): void {const chatState = mainConversation().state;const sessionId = splitState.active ? null : (chatState.sessionId ?? chatState.rememberedSessionId);