clay-server 3.8.1 → 4.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/ask-user-mcp-server.js +5 -119
- package/lib/builtin-mates.js +6 -6
- package/lib/claude-hook-installer.js +15 -0
- package/lib/clay-history-mcp-server.js +62 -297
- package/lib/daemon.js +1 -1
- package/lib/debate-model-selection.js +119 -0
- package/lib/home-debate-tool-policy.js +164 -0
- package/lib/home-response-notifications.js +26 -0
- package/lib/mate-creation-mcp-server.js +55 -0
- package/lib/mate-ready-creation.js +95 -0
- package/lib/mates.js +2 -0
- package/lib/notes.js +2 -1
- package/lib/project-ask-user.js +64 -0
- package/lib/project-capsule-catalog.js +101 -0
- package/lib/project-connection.js +4 -0
- package/lib/project-debate-proposal.js +133 -17
- package/lib/project-debate.js +214 -110
- package/lib/project-delegated-follow-up.js +84 -0
- package/lib/project-delegated-session.js +53 -0
- package/lib/project-filesystem.js +7 -9
- package/lib/project-knowledge.js +1 -0
- package/lib/project-mate-creation-proposal.js +120 -0
- package/lib/project-memory.js +14 -7
- package/lib/project-models.js +157 -32
- package/lib/project-session-notes.js +2 -2
- package/lib/project-session-pair.js +8 -8
- package/lib/project-sessions.js +66 -51
- package/lib/project-vendor-login.js +397 -0
- package/lib/project-worker-proposal.js +25 -25
- package/lib/project-workspace-query.js +144 -0
- package/lib/project.js +349 -102
- package/lib/public/app.js +85 -42
- package/lib/public/css/avatar-imprints.css +0 -1
- package/lib/public/css/base.css +4 -0
- package/lib/public/css/capsule-ui.css +389 -0
- package/lib/public/css/command-palette.css +306 -6
- package/lib/public/css/home-capsule-library.css +243 -0
- package/lib/public/css/home-capsule-source.css +192 -0
- package/lib/public/css/home-debate-live.css +146 -0
- package/lib/public/css/home-debate-planning.css +125 -0
- package/lib/public/css/home-debates-archive.css +281 -0
- package/lib/public/css/home-hub.css +896 -405
- package/lib/public/css/home-mate-creation.css +34 -0
- package/lib/public/css/home-mate-model-picker.css +131 -0
- package/lib/public/css/home-mate-settings.css +344 -0
- package/lib/public/css/home-session-actions.css +265 -0
- package/lib/public/css/home-sidebar.css +667 -0
- package/lib/public/css/icon-strip.css +1 -2
- package/lib/public/css/mates.css +7 -34
- package/lib/public/css/pane.css +1 -1
- package/lib/public/css/playbook.css +0 -80
- package/lib/public/css/sticky-notes.css +53 -117
- package/lib/public/css/tui-attention.css +0 -44
- package/lib/public/css/workspace-assignment.css +45 -0
- package/lib/public/fonts/source-serif-4/LICENSE.md +93 -0
- package/lib/public/fonts/source-serif-4/SourceSerif4Caption-Semibold.ttf.woff2 +0 -0
- package/lib/public/index.html +93 -74
- package/lib/public/modules/app-connection.js +10 -1
- package/lib/public/modules/app-dm.js +43 -160
- package/lib/public/modules/app-home-hub.js +328 -585
- package/lib/public/modules/app-message-cards.js +242 -0
- package/lib/public/modules/app-message-router.js +84 -0
- package/lib/public/modules/app-messages.js +102 -37
- package/lib/public/modules/app-notifications.js +8 -119
- package/lib/public/modules/app-projects.js +9 -1
- package/lib/public/modules/app-rendering.js +21 -602
- package/lib/public/modules/avatar-imprint.js +11 -8
- package/lib/public/modules/chat-bubble-renderer.js +152 -0
- package/lib/public/modules/chat-render-runtime.js +198 -0
- package/lib/public/modules/command-palette.js +225 -436
- package/lib/public/modules/dm-render.js +82 -0
- package/lib/public/modules/home-capsule-creation-intent.js +31 -0
- package/lib/public/modules/home-capsule-library.js +146 -0
- package/lib/public/modules/home-capsule-source.js +383 -0
- package/lib/public/modules/home-chat-identity.js +35 -0
- package/lib/public/modules/home-chat-scroll.js +77 -0
- package/lib/public/modules/home-chat-stream-state.js +34 -0
- package/lib/public/modules/home-composer-focus.js +25 -0
- package/lib/public/modules/home-conversations-sheet.js +179 -0
- package/lib/public/modules/home-debate-activity.js +48 -0
- package/lib/public/modules/home-debate-controls.js +295 -0
- package/lib/public/modules/home-debate-launch.js +41 -0
- package/lib/public/modules/home-debate-live.js +284 -0
- package/lib/public/modules/home-debate-models.js +73 -0
- package/lib/public/modules/home-debate-planning.js +335 -0
- package/lib/public/modules/home-debates-archive.js +279 -0
- package/lib/public/modules/home-dock-resize.js +74 -0
- package/lib/public/modules/home-dock.js +446 -0
- package/lib/public/modules/home-mate-chat.js +496 -0
- package/lib/public/modules/home-mate-creation.js +109 -0
- package/lib/public/modules/home-mate-model-picker.js +281 -0
- package/lib/public/modules/home-mate-selection.js +38 -0
- package/lib/public/modules/home-mate-settings-menu.js +131 -0
- package/lib/public/modules/home-mate-settings.js +383 -0
- package/lib/public/modules/home-session-actions.js +373 -0
- package/lib/public/modules/home-session-model-confirmation.js +13 -0
- package/lib/public/modules/home-shell.js +9 -0
- package/lib/public/modules/home-sidebar-chat-list.js +63 -0
- package/lib/public/modules/home-sidebar.js +158 -0
- package/lib/public/modules/home-sub-surface.js +19 -0
- package/lib/public/modules/home-surface-boot.js +68 -0
- package/lib/public/modules/home-surface.js +141 -0
- package/lib/public/modules/home-tools.js +271 -0
- package/lib/public/modules/markdown.js +50 -2
- package/lib/public/modules/mate-management.js +86 -0
- package/lib/public/modules/mate-wizard.js +0 -7
- package/lib/public/modules/mention.js +17 -19
- package/lib/public/modules/pane-bridge.js +9 -0
- package/lib/public/modules/profile.js +4 -5
- package/lib/public/modules/project-settings.js +34 -28
- package/lib/public/modules/project-switcher.js +11 -5
- package/lib/public/modules/project-workspace-assignment.js +23 -0
- package/lib/public/modules/search-clay-chat.js +402 -0
- package/lib/public/modules/server-settings.js +14 -12
- package/lib/public/modules/session-actions.js +1 -1
- package/lib/public/modules/sidebar-mates.js +56 -552
- package/lib/public/modules/sidebar-mobile.js +7 -64
- package/lib/public/modules/sidebar-presence.js +37 -0
- package/lib/public/modules/split-pair-ui.js +13 -13
- package/lib/public/modules/split-view.js +7 -0
- package/lib/public/modules/sticky-notes.js +7 -6
- package/lib/public/modules/tool-input-composition.js +48 -0
- package/lib/public/modules/tool-llm-status.js +167 -0
- package/lib/public/modules/tool-renderer-advanced.js +285 -0
- package/lib/public/modules/tool-renderer-chart.js +158 -0
- package/lib/public/modules/tool-renderer-semantics.js +35 -0
- package/lib/public/modules/tool-renderer.js +464 -0
- package/lib/public/modules/tool-runtime.js +309 -0
- package/lib/public/modules/tool-ui-evaluator.js +97 -0
- package/lib/public/modules/tool-ui-tree.js +21 -0
- package/lib/public/modules/tui-attention.js +10 -0
- package/lib/public/modules/user-settings.js +16 -23
- package/lib/public/modules/vendor-login.js +287 -0
- package/lib/public/modules/worker-proposal.js +2 -2
- package/lib/public/modules/workspace-assignment-card.js +149 -0
- package/lib/public/modules/workspace-assignment-routing.js +4 -0
- package/lib/public/style.css +13 -2
- package/lib/runtime-env.js +65 -0
- package/lib/sdk-bridge.js +120 -32
- package/lib/sdk-message-processor.js +10 -6
- package/lib/server-home-capsule-creation.js +36 -0
- package/lib/server-home-chat-events.js +287 -0
- package/lib/server-home-chat.js +518 -0
- package/lib/server-home-clay-entry.js +65 -0
- package/lib/server-home-clay-session-links.js +26 -0
- package/lib/server-home-debate-planning.js +214 -0
- package/lib/server-home-debates.js +137 -0
- package/lib/server-home-mate-creation.js +261 -0
- package/lib/server-home-models.js +241 -0
- package/lib/server-home-preferences.js +61 -0
- package/lib/server-mates.js +37 -0
- package/lib/server-tools.js +377 -0
- package/lib/server.js +111 -59
- package/lib/session-pair-mcp-server.js +6 -6
- package/lib/sessions.js +18 -3
- package/lib/tool-capsule-source.js +142 -0
- package/lib/tool-control-mcp-server.js +126 -0
- package/lib/tool-llm.js +48 -0
- package/lib/tool-storage.js +77 -0
- package/lib/tool-ui-spec-advanced.js +82 -0
- package/lib/tool-ui-spec.js +261 -0
- package/lib/tools-registry.js +286 -0
- package/lib/users-home-dock-preferences.js +77 -0
- package/lib/users-home-surface-preferences.js +99 -0
- package/lib/users-preferences.js +4 -7
- package/lib/users.js +12 -0
- package/lib/whats-new-content.js +3 -3
- package/lib/workspace-assignment-service.js +420 -0
- package/lib/workspace-query-mcp-server.js +154 -0
- package/lib/workspace-query-service.js +492 -0
- package/lib/ws-schema.js +93 -12
- package/lib/yoke/adapters/acp.js +2 -1
- package/lib/yoke/adapters/antigravity.js +2 -1
- package/lib/yoke/adapters/claude-worker.js +11 -4
- package/lib/yoke/adapters/claude.js +73 -43
- package/lib/yoke/adapters/codex.js +40 -10
- package/lib/yoke/adapters/kiro.js +2 -1
- package/lib/yoke/claude-user-input.js +38 -0
- package/lib/yoke/codex-app-server.js +20 -2
- package/lib/yoke/codex-user-input.js +64 -0
- package/lib/yoke/complete-once.js +164 -0
- package/lib/yoke/index.js +5 -1
- package/lib/yoke/interface.js +19 -0
- package/lib/yoke/mcp-bridge-server.js +2 -6
- package/lib/yoke/user-input.js +254 -0
- package/package.json +3 -2
- package/lib/public/css/home-chat.css +0 -380
- package/lib/public/modules/home-chat.js +0 -438
- package/lib/server-clay-home.js +0 -245
package/lib/public/app.js
CHANGED
|
@@ -12,7 +12,8 @@ import {
|
|
|
12
12
|
} from './modules/sidebar-projects.js';
|
|
13
13
|
import {
|
|
14
14
|
renderUserStrip, closeDmUserPicker, setCurrentDmUser,
|
|
15
|
-
updateDmBadge,
|
|
15
|
+
updateDmBadge, setMentionActive, clearAllMentionActive,
|
|
16
|
+
onMentionActiveChange
|
|
16
17
|
} from './modules/sidebar-mates.js';
|
|
17
18
|
import {
|
|
18
19
|
openMobileSheet, setMobileSheetMateData, refreshMobileChatSheet
|
|
@@ -47,21 +48,24 @@ import { initPaneBridge } from './modules/pane-bridge.js';
|
|
|
47
48
|
import { initAdmin, checkAdminAccess } from './modules/admin.js';
|
|
48
49
|
import { initSessionSearch, toggleSearch, closeSearch, isSearchOpen, handleFindInSessionResults, onHistoryPrepended as onSessionSearchHistoryPrepended } from './modules/session-search.js';
|
|
49
50
|
import { initTooltips, registerTooltip } from './modules/tooltip.js';
|
|
50
|
-
import { initMateWizard, openMateWizard, closeMateWizard, handleMateCreated } from './modules/mate-wizard.js';
|
|
51
51
|
import { initCommandPalette, handlePaletteSessionSwitch, setPaletteVersion } from './modules/command-palette.js';
|
|
52
52
|
import { initLongPress } from './modules/longpress.js';
|
|
53
53
|
import { initShellCommand } from './modules/shell-command.js';
|
|
54
54
|
import { initConnection, connect as _connConnect, setStatus as _connSetStatus, scheduleReconnect as _connScheduleReconnect, cancelReconnect as _connCancelReconnect } from './modules/app-connection.js';
|
|
55
55
|
import { processMessage as _msgProcessMessage } from './modules/app-messages.js';
|
|
56
56
|
import { getWs as _getWsRef, setWs as _setWsRef } from './modules/ws-ref.js';
|
|
57
|
-
import { initHomeHub, showHomeHub as _hubShowHomeHub, hideHomeHub as _hubHideHomeHub,
|
|
57
|
+
import { initHomeHub, showHomeHub as _hubShowHomeHub, hideHomeHub as _hubHideHomeHub, isHomeHubVisible, renderHomeMateSwitcher, updateHomeIconBadge } from './modules/app-home-hub.js';
|
|
58
|
+
import { initHomeSidebar } from './modules/home-sidebar.js';
|
|
59
|
+
import { openHomeMateAction } from './modules/home-mate-chat.js';
|
|
60
|
+
import { initHomeSurfaceBoot } from './modules/home-surface-boot.js';
|
|
61
|
+
import { rememberHomePrimarySurface } from './modules/home-surface.js';
|
|
58
62
|
import { initRateLimit, handleRateLimitEvent as _rlHandleRateLimitEvent, updateRateLimitUsage as _rlUpdateRateLimitUsage, addScheduledMessageBubble as _rlAddScheduledMessageBubble, removeScheduledMessageBubble as _rlRemoveScheduledMessageBubble, handleFastModeState as _rlHandleFastModeState, getScheduledMsgEl, resetRateLimitState } from './modules/app-rate-limit.js';
|
|
59
63
|
import { initCursors, handleRemoteCursorMove as _curHandleRemoteCursorMove, handleRemoteCursorLeave as _curHandleRemoteCursorLeave, handleRemoteSelection as _curHandleRemoteSelection, clearRemoteCursors as _curClearRemoteCursors, initCursorToggle } from './modules/app-cursors.js';
|
|
60
64
|
import { initFavicon, updateFavicon as _favUpdateFavicon, setSendBtnMode as _favSetSendBtnMode, blinkIO as _favBlinkIO, blinkSessionDot as _favBlinkSessionDot, updateCrossProjectBlink as _favUpdateCrossProjectBlink, startUrgentBlink as _favStartUrgentBlink, stopUrgentBlink as _favStopUrgentBlink, setActivity as _favSetActivity } from './modules/app-favicon.js';
|
|
61
65
|
import { initHeader, closeSessionInfoPopover as _hdrCloseSessionInfoPopover, updateHistorySentinel as _hdrUpdateHistorySentinel, requestMoreHistory as _hdrRequestMoreHistory, prependOlderHistory as _hdrPrependOlderHistory } from './modules/app-header.js';
|
|
62
66
|
import { initSessionActions } from './modules/session-actions.js';
|
|
63
67
|
import { initMisc, flushPendingExtMessages, showImageModal as _miscShowImageModal, closeImageModal as _miscCloseImageModal, showPasteModal as _miscShowPasteModal, closePasteModal as _miscClosePasteModal, showConfirm as _miscShowConfirm, hideConfirm as _miscHideConfirm, showForceChangePinOverlay as _miscShowForceChangePinOverlay, sendExtensionCommand as _miscSendExtensionCommand, handleExtensionResult as _miscHandleExtensionResult } from './modules/app-misc.js';
|
|
64
|
-
import { initSkillInstall, requireSkills as _siRequireSkills,
|
|
68
|
+
import { initSkillInstall, requireSkills as _siRequireSkills, handleSkillInstallWs as _siHandleSkillInstallWs } from './modules/app-skills-install.js';
|
|
65
69
|
import { initDebateUi, showDebateConcludeConfirm as _debShowDebateConcludeConfirm, exitDebateConcludeMode as _debExitDebateConcludeMode, handleDebateConcludeSend as _debHandleDebateConcludeSend, showDebateEndedMode as _debShowDebateEndedMode, exitDebateEndedMode as _debExitDebateEndedMode, showDebateUserFloor as _debShowDebateUserFloor, exitDebateFloorMode as _debExitDebateFloorMode, handleDebateFloorSend as _debHandleDebateFloorSend, renderDebateUserFloorDone as _debRenderDebateUserFloorDone, showDebateSticky as _debShowDebateSticky, showDebateBottomBar as _debShowDebateBottomBar, removeDebateBottomBar as _debRemoveDebateBottomBar, sendDebateStickyComment as _debSendDebateStickyComment, updateDebateRound as _debUpdateDebateRound } from './modules/app-debate-ui.js';
|
|
66
70
|
import { initLoopUi, updateLoopInputVisibility as _loopUpdateLoopInputVisibility, updateLoopButton as _loopUpdateLoopButton, showLoopBanner as _loopShowLoopBanner, updateLoopBanner as _loopUpdateLoopBanner, updateRalphBars as _loopUpdateRalphBars, showRalphCraftingBar as _loopShowRalphCraftingBar, showRalphApprovalBar as _loopShowRalphApprovalBar, updateRalphApprovalStatus as _loopUpdateRalphApprovalStatus, openRalphPreviewModal as _loopOpenRalphPreviewModal, showExecModal as _loopShowExecModal, closeExecModal as _loopCloseExecModal, updateExecModalStatus as _loopUpdateExecModalStatus } from './modules/app-loop-ui.js';
|
|
67
71
|
import { initBackgroundTasksUi } from './modules/background-tasks-ui.js';
|
|
@@ -74,7 +78,7 @@ import { createStore, store } from './modules/store.js';
|
|
|
74
78
|
import { initPanels, updateConfigChip as _panUpdateConfigChip, getModelEffortLevels as _panGetModelEffortLevels, accumulateUsage as _panAccumulateUsage, updateUsagePanel as _panUpdateUsagePanel, resetUsage as _panResetUsage, toggleUsagePanel as _panToggleUsagePanel, formatTokens as _panFormatTokens, updateStatusPanel as _panUpdateStatusPanel, requestProcessStats as _panRequestProcessStats, toggleStatusPanel as _panToggleStatusPanel, accumulateContext as _panAccumulateContext, updateContextPanel as _panUpdateContextPanel, resetContext as _panResetContext, resetContextData as _panResetContextData, minimizeContext as _panMinimizeContext, expandContext as _panExpandContext, toggleContextPanel as _panToggleContextPanel, getContextView as _panGetContextView, renderCtxPopover as _panRenderCtxPopover, hideCtxPopover as _panHideCtxPopover, formatBytes as _panFormatBytes, formatUptime as _panFormatUptime, getModelSupportsEffort as _panGetModelSupportsEffort, getSessionUsage, setSessionUsage, getContextData, setContextData, setContextView as _panSetContextView, applyContextView as _panApplyContextView } from './modules/app-panels.js';
|
|
75
79
|
import { initProjects, updateProjectList as _projUpdateProjectList, renderProjectList as _projRenderProjectList, renderTopbarPresence as _projRenderTopbarPresence, switchProject as _projSwitchProject, resetClientState as _projResetClientState, confirmRemoveProject as _projConfirmRemoveProject, handleRemoveProjectCheckResult as _projHandleRemoveProjectCheckResult, handleRemoveProjectResult as _projHandleRemoveProjectResult, openAddProjectModal as _projOpenAddProjectModal, closeAddProjectModal as _projCloseAddProjectModal, handleBrowseDirResult as _projHandleBrowseDirResult, handleAddProjectResult as _projHandleAddProjectResult, handleCloneProgress as _projHandleCloneProgress, showUpdateAvailable as _projShowUpdateAvailable, getCachedProjects, setCachedProjects, getCachedProjectCount, getCachedRemovedProjects, setCachedRemovedProjects } from './modules/app-projects.js';
|
|
76
80
|
import { initRendering, addToMessages as _renAddToMessages, scrollToBottom as _renScrollToBottom, forceScrollToBottom as _renForceScrollToBottom, addUserMessage as _renAddUserMessage, getMsgTime as _renGetMsgTime, shouldGroupMessage as _renShouldGroupMessage, ensureAssistantBlock as _renEnsureAssistantBlock, addCopyHandler as _renAddCopyHandler, appendDelta as _renAppendDelta, flushStreamBuffer as _renFlushStreamBuffer, finalizeAssistantBlock as _renFinalizeAssistantBlock, addSystemMessage as _renAddSystemMessage, addConflictMessage as _renAddConflictMessage, addContextOverflowMessage as _renAddContextOverflowMessage, showClaudePreThinking as _renShowClaudePreThinking, showMatePreThinking as _renShowMatePreThinking, removeMatePreThinking as _renRemoveMatePreThinking, showSuggestionChips as _renShowSuggestionChips, hideSuggestionChips as _renHideSuggestionChips, getGhostSuggestion as _renGetGhostSuggestion, getTurnCounter, setTurnCounter, getPrependAnchor, setPrependAnchor, getActivityEl, setActivityEl, getIsUserScrolledUp, setIsUserScrolledUp, getStickyBottom, armStickyBottom, disarmStickyBottom } from './modules/app-rendering.js';
|
|
77
|
-
import { initDm, openDm as _dmOpenDm, enterDmMode as _dmEnterDmMode, exitDmMode as _dmExitDmMode, handleMateCreatedInApp as _dmHandleMateCreatedInApp,
|
|
81
|
+
import { initDm, openDm as _dmOpenDm, enterDmMode as _dmEnterDmMode, exitDmMode as _dmExitDmMode, handleMateCreatedInApp as _dmHandleMateCreatedInApp, buildMateInterviewPrompt as _dmBuildMateInterviewPrompt, updateMateIconStatus as _dmUpdateMateIconStatus, connectMateProject as _dmConnectMateProject, disconnectMateProject as _dmDisconnectMateProject, appendDmMessage as _dmAppendDmMessage, showDmTypingIndicator as _dmShowDmTypingIndicator, handleDmSend as _dmHandleDmSend } from './modules/app-dm.js';
|
|
78
82
|
import { initMention, handleMentionStart, handleMentionStream, handleMentionDone, handleMentionError, handleMentionActivity, renderMentionUser, renderMentionResponse } from './modules/mention.js';
|
|
79
83
|
import { initDebate, handleDebatePreparing, handleDebateStarted, handleDebateResumed, handleDebateTurn, handleDebateActivity, handleDebateStream, handleDebateTurnDone, handleDebateCommentQueued, handleDebateCommentInjected, handleDebateEnded, handleDebateError, renderDebateStarted, renderDebateTurnDone, renderDebateEnded, renderDebateCommentInjected, renderDebateUserResume, openDebateModal, closeDebateModal, handleDebateBriefReady, renderDebateBriefReady, isDebateActive, resetDebateState, exportDebateAsPdf, renderMcpDebateProposal } from './modules/debate.js';
|
|
80
84
|
|
|
@@ -85,8 +89,10 @@ import { initDebate, handleDebatePreparing, handleDebateStarted, handleDebateRes
|
|
|
85
89
|
if (!Number.isSafeInteger(paneSessionId) || paneSessionId < 1) paneSessionId = null;
|
|
86
90
|
if (paneMode) document.body.classList.add("pane-mode");
|
|
87
91
|
var slugMatch = location.pathname.match(/^\/p\/([a-z0-9_-]+)/);
|
|
88
|
-
var
|
|
89
|
-
var
|
|
92
|
+
var homeProjectSlug = document.body.dataset.homeProjectSlug || null;
|
|
93
|
+
var connectionSlug = slugMatch ? slugMatch[1] : homeProjectSlug;
|
|
94
|
+
var basePath = connectionSlug ? "/p/" + connectionSlug + "/" : "/";
|
|
95
|
+
var wsPath = connectionSlug ? "/p/" + connectionSlug + "/ws" : "/ws";
|
|
90
96
|
if (paneMode) {
|
|
91
97
|
wsPath += "?pane=1";
|
|
92
98
|
if (paneSessionId) wsPath += "&session=" + paneSessionId;
|
|
@@ -129,17 +135,18 @@ import { initDebate, handleDebatePreparing, handleDebateStarted, handleDebateRes
|
|
|
129
135
|
|
|
130
136
|
|
|
131
137
|
// --- Home Hub (delegated to app-home-hub.js) ---
|
|
132
|
-
function showHomeHub() { _hubShowHomeHub(); }
|
|
138
|
+
function showHomeHub(fromHistory) { _hubShowHomeHub(fromHistory); }
|
|
133
139
|
function hideHomeHub() { _hubHideHomeHub(); }
|
|
134
|
-
function
|
|
135
|
-
|
|
140
|
+
function startClayMateCreation() {
|
|
141
|
+
showHomeHub();
|
|
142
|
+
openHomeMateAction("mate");
|
|
143
|
+
}
|
|
136
144
|
|
|
137
145
|
// --- DM (delegated to app-dm.js) ---
|
|
138
146
|
function openDm(userId) { _dmOpenDm(userId); }
|
|
139
147
|
function enterDmMode(key, targetUser, messages) { _dmEnterDmMode(key, targetUser, messages); }
|
|
140
148
|
function exitDmMode(skipProjectSwitch) { _dmExitDmMode(skipProjectSwitch); }
|
|
141
149
|
function handleMateCreatedInApp(mate, msg) { _dmHandleMateCreatedInApp(mate, msg); }
|
|
142
|
-
function renderAvailableBuiltins(builtins) { _dmRenderAvailableBuiltins(builtins); }
|
|
143
150
|
function buildMateInterviewPrompt(mate) { return _dmBuildMateInterviewPrompt(mate); }
|
|
144
151
|
function updateMateIconStatus(msg) { _dmUpdateMateIconStatus(msg); }
|
|
145
152
|
function connectMateProject(slug) { _dmConnectMateProject(slug); }
|
|
@@ -156,7 +163,7 @@ import { initDebate, handleDebatePreparing, handleDebateStarted, handleDebateRes
|
|
|
156
163
|
var projectHintDismiss = $("project-hint-dismiss");
|
|
157
164
|
// cachedProjects, cachedProjectCount, cachedRemovedProjects -> modules/app-projects.js
|
|
158
165
|
// currentProjectOwnerId -> store
|
|
159
|
-
var currentSlug =
|
|
166
|
+
var currentSlug = connectionSlug || null; // kept for pre-store init
|
|
160
167
|
|
|
161
168
|
// updateProjectList, renderTopbarPresence, renderProjectList -> modules/app-projects.js
|
|
162
169
|
function updateProjectList(msg) { _projUpdateProjectList(msg); }
|
|
@@ -184,18 +191,6 @@ import { initDebate, handleDebatePreparing, handleDebateStarted, handleDebateRes
|
|
|
184
191
|
|
|
185
192
|
document.addEventListener("keydown", function (e) {
|
|
186
193
|
if (e.key === "Escape") {
|
|
187
|
-
if (isHomeHubVisible() && store.get('currentSlug')) {
|
|
188
|
-
hideHomeHub();
|
|
189
|
-
if (document.documentElement.classList.contains("pwa-standalone")) {
|
|
190
|
-
history.replaceState(null, "", "/p/" + store.get('currentSlug') + "/");
|
|
191
|
-
} else {
|
|
192
|
-
history.pushState(null, "", "/p/" + store.get('currentSlug') + "/");
|
|
193
|
-
}
|
|
194
|
-
var homeIcon = document.querySelector(".icon-strip-home");
|
|
195
|
-
if (homeIcon) homeIcon.classList.remove("active");
|
|
196
|
-
renderProjectList();
|
|
197
|
-
return;
|
|
198
|
-
}
|
|
199
194
|
closeImageModal();
|
|
200
195
|
}
|
|
201
196
|
});
|
|
@@ -302,13 +297,47 @@ import { initDebate, handleDebatePreparing, handleDebateStarted, handleDebateRes
|
|
|
302
297
|
isHeadlessMode: false,
|
|
303
298
|
savedMainSlug: null,
|
|
304
299
|
connected: false,
|
|
300
|
+
homeChatMateId: null,
|
|
301
|
+
homeChatSessionId: null,
|
|
302
|
+
homeChatSessionModel: null,
|
|
303
|
+
homeChatSessionVendor: null,
|
|
304
|
+
homeChatSessionModelLoading: false,
|
|
305
|
+
homeMateSessions: {},
|
|
306
|
+
homeActiveSessionByMate: {},
|
|
307
|
+
homePreferredMateId: null,
|
|
308
|
+
homeSidebarCollapsed: false,
|
|
309
|
+
homeChatScope: "all",
|
|
310
|
+
homeSubSurface: "chat",
|
|
311
|
+
homeDebatesStatus: "idle",
|
|
312
|
+
homeDebates: [],
|
|
313
|
+
homeDebatesRequestId: null,
|
|
314
|
+
homeDebatesError: "",
|
|
315
|
+
homeSurfaceLoaded: false,
|
|
316
|
+
homePrimarySurface: null,
|
|
317
|
+
homeSurfaceProjectSlug: null,
|
|
318
|
+
homeSurfaceIntent: null,
|
|
319
|
+
homeSurfaceBootResolved: false,
|
|
320
|
+
homeSurfaceRestoreRequested: false,
|
|
321
|
+
dockActiveToolId: null,
|
|
322
|
+
dockOpen: false,
|
|
323
|
+
homeDockPreferenceLoaded: false,
|
|
324
|
+
dockFocus: false,
|
|
325
|
+
dockLibraryOpen: false,
|
|
326
|
+
dockBackstageOpen: false,
|
|
327
|
+
dockWidth: null,
|
|
328
|
+
dockHasActivity: false,
|
|
329
|
+
dockActivityToolId: null,
|
|
330
|
+
installedTools: [],
|
|
331
|
+
homeToolRegistryLoaded: false,
|
|
332
|
+
toolScanErrors: [],
|
|
333
|
+
|
|
305
334
|
// dm
|
|
306
335
|
dmTargetUser: null,
|
|
307
336
|
dmKey: null,
|
|
308
337
|
cachedMatesList: [],
|
|
309
338
|
cachedDmFavorites: [],
|
|
310
339
|
cachedAvailableBuiltins: [],
|
|
311
|
-
|
|
340
|
+
projectMateDmsEnabled: false,
|
|
312
341
|
returningFromMateDm: false,
|
|
313
342
|
pendingMateInterview: null,
|
|
314
343
|
pendingTermCommand: null,
|
|
@@ -438,7 +467,7 @@ import { initDebate, handleDebatePreparing, handleDebateStarted, handleDebateRes
|
|
|
438
467
|
get projectOwnerId() { return store.get('currentProjectOwnerId'); },
|
|
439
468
|
get ownerLocked() { return store.get('ownerLocked'); },
|
|
440
469
|
openDm: function (userId) { openDm(userId); },
|
|
441
|
-
openMateWizard: function () {
|
|
470
|
+
openMateWizard: function () { startClayMateCreation(); },
|
|
442
471
|
openAddProjectModal: function () { openAddProjectModal(); },
|
|
443
472
|
sendWs: function (msg) { var _ws = _getWsRef(); if (_ws && _ws.readyState === 1) _ws.send(JSON.stringify(msg)); },
|
|
444
473
|
onDmRemoveUser: function (userId) { var dr = Object.assign({}, store.get('dmRemovedUsers')); dr[userId] = true; store.set({ dmRemovedUsers: dr }); },
|
|
@@ -456,15 +485,9 @@ import { initDebate, handleDebatePreparing, handleDebateStarted, handleDebateRes
|
|
|
456
485
|
initMateSidebar(wsGetter);
|
|
457
486
|
initMateKnowledge(wsGetter);
|
|
458
487
|
initMateMemory(wsGetter, { onShow: function () { hideKnowledge(); hideNotes(); } });
|
|
459
|
-
initMateWizard(
|
|
460
|
-
function (msg) { var _ws = _getWsRef(); if (_ws && _ws.readyState === 1) _ws.send(JSON.stringify(msg)); },
|
|
461
|
-
function (mate) { handleMateCreatedInApp(mate); }
|
|
462
|
-
);
|
|
463
|
-
|
|
464
488
|
initCommandPalette({
|
|
465
489
|
switchProject: function (slug) { switchProject(slug); },
|
|
466
490
|
currentSlug: function () { return store.get('currentSlug'); },
|
|
467
|
-
projectList: function () { return getCachedProjects() || []; },
|
|
468
491
|
matesList: function () { return store.get('cachedMatesList') || []; },
|
|
469
492
|
availableBuiltins: function () { return store.get('cachedAvailableBuiltins') || []; },
|
|
470
493
|
allUsers: function () { return store.get('cachedAllUsers') || []; },
|
|
@@ -486,7 +509,7 @@ import { initDebate, handleDebatePreparing, handleDebateStarted, handleDebateRes
|
|
|
486
509
|
openDm: function (userId) { openDm(userId); },
|
|
487
510
|
runAction: function (action) {
|
|
488
511
|
switch (action) {
|
|
489
|
-
case "createMate":
|
|
512
|
+
case "createMate": startClayMateCreation(); break;
|
|
490
513
|
case "openSettings":
|
|
491
514
|
var sb = document.getElementById("server-settings-btn");
|
|
492
515
|
if (sb) sb.click();
|
|
@@ -741,6 +764,12 @@ import { initDebate, handleDebatePreparing, handleDebateStarted, handleDebateRes
|
|
|
741
764
|
window.addEventListener("popstate", function () {
|
|
742
765
|
var m = location.pathname.match(/^\/p\/([a-z0-9_-]+)/);
|
|
743
766
|
var newSlug = m ? m[1] : null;
|
|
767
|
+
if (!newSlug) {
|
|
768
|
+
showHomeHub(true);
|
|
769
|
+
return;
|
|
770
|
+
}
|
|
771
|
+
rememberHomePrimarySurface("project", newSlug);
|
|
772
|
+
if (isHomeHubVisible()) hideHomeHub();
|
|
744
773
|
if (newSlug && newSlug !== store.get('currentSlug')) {
|
|
745
774
|
resetFileBrowser();
|
|
746
775
|
closeArchive();
|
|
@@ -847,7 +876,10 @@ import { initDebate, handleDebatePreparing, handleDebateStarted, handleDebateRes
|
|
|
847
876
|
addCopyHandler: addCopyHandler,
|
|
848
877
|
matesList: function () { return store.get('cachedMatesList') || []; },
|
|
849
878
|
availableBuiltins: function () { return store.get('cachedAvailableBuiltins') || []; },
|
|
850
|
-
currentMateId: function () {
|
|
879
|
+
currentMateId: function () {
|
|
880
|
+
if (store.get('dmTargetUser') && store.get('dmTargetUser').isMate) return store.get('dmTargetUser').id;
|
|
881
|
+
return store.get('homeChatMateId') || null;
|
|
882
|
+
},
|
|
851
883
|
requireSkills: requireSkills,
|
|
852
884
|
showDebateEndedMode: function (msg) { showDebateEndedMode(msg); },
|
|
853
885
|
});
|
|
@@ -880,9 +912,8 @@ import { initDebate, handleDebatePreparing, handleDebateStarted, handleDebateRes
|
|
|
880
912
|
fetch("/api/me").then(function (r) { return r.json(); }).then(function (d) {
|
|
881
913
|
if (d.multiUser) {
|
|
882
914
|
store.set({ isMultiUserMode: true });
|
|
883
|
-
//
|
|
884
|
-
// the
|
|
885
|
-
// multi-user keeps it visible (still hosts other users' avatars).
|
|
915
|
+
// The shared strip also hosts other users in multi-user deployments;
|
|
916
|
+
// the project Mate DM preference therefore hides only Mate shortcuts.
|
|
886
917
|
if (document.body) document.body.classList.add('is-multi-user');
|
|
887
918
|
}
|
|
888
919
|
if (d.user && d.user.id) { store.set({ myUserId: d.user.id }); }
|
|
@@ -1118,7 +1149,6 @@ import { initDebate, handleDebatePreparing, handleDebateStarted, handleDebateRes
|
|
|
1118
1149
|
// --- Skill install dialog (delegated to app-skills-install.js) ---
|
|
1119
1150
|
// knownInstalledSkills, pendingSkillInstalls -> modules/app-skills-install.js
|
|
1120
1151
|
function requireSkills(opts, cb) { _siRequireSkills(opts, cb); }
|
|
1121
|
-
function requireClayMateInterview(cb) { _siRequireClayMateInterview(cb); }
|
|
1122
1152
|
function handleSkillInstallWs(msg) { _siHandleSkillInstallWs(msg); }
|
|
1123
1153
|
|
|
1124
1154
|
|
|
@@ -1210,6 +1240,21 @@ import { initDebate, handleDebatePreparing, handleDebateStarted, handleDebateRes
|
|
|
1210
1240
|
|
|
1211
1241
|
// --- Home Hub module ---
|
|
1212
1242
|
initHomeHub();
|
|
1243
|
+
initHomeSidebar();
|
|
1244
|
+
initHomeSurfaceBoot();
|
|
1245
|
+
|
|
1246
|
+
// Mates live on the home hub now, so keep that pane and the C button
|
|
1247
|
+
// badge in sync with the mate list, unread DMs, and mention activity.
|
|
1248
|
+
store.subscribe(function (state, prev) {
|
|
1249
|
+
if (state.cachedMatesList !== prev.cachedMatesList || state.dmUnread !== prev.dmUnread) {
|
|
1250
|
+
renderHomeMateSwitcher();
|
|
1251
|
+
updateHomeIconBadge();
|
|
1252
|
+
}
|
|
1253
|
+
});
|
|
1254
|
+
onMentionActiveChange(function () {
|
|
1255
|
+
renderHomeMateSwitcher();
|
|
1256
|
+
});
|
|
1257
|
+
updateHomeIconBadge();
|
|
1213
1258
|
|
|
1214
1259
|
// --- DM module ---
|
|
1215
1260
|
initDm();
|
|
@@ -1222,11 +1267,9 @@ import { initDebate, handleDebatePreparing, handleDebateStarted, handleDebateRes
|
|
|
1222
1267
|
// --- Init ---
|
|
1223
1268
|
lucide.createIcons();
|
|
1224
1269
|
connect();
|
|
1225
|
-
if (
|
|
1226
|
-
showHomeHub();
|
|
1227
|
-
} else if (location.hash === "#scheduler") {
|
|
1270
|
+
if (slugMatch && location.hash === "#scheduler") {
|
|
1228
1271
|
// Restore scheduler view after refresh
|
|
1229
1272
|
setTimeout(function () { openSchedulerToTab("calendar"); }, 500);
|
|
1230
|
-
} else {
|
|
1273
|
+
} else if (slugMatch) {
|
|
1231
1274
|
inputEl.focus();
|
|
1232
1275
|
}
|
package/lib/public/css/base.css
CHANGED
|
@@ -95,6 +95,10 @@ img.emoji {
|
|
|
95
95
|
--brand-paper: #f2f2ef;
|
|
96
96
|
--brand-indigo: #5857fc;
|
|
97
97
|
--brand-green: #07e5a3;
|
|
98
|
+
--brand-gold: #e0b45b;
|
|
99
|
+
--brand-blue: #8aa7ff;
|
|
100
|
+
--brand-coral: #ff7479;
|
|
101
|
+
--brand-clay: #d69a7d;
|
|
98
102
|
--font-weight-body: 400;
|
|
99
103
|
--font-weight-ui: 500;
|
|
100
104
|
--font-weight-heading: 600;
|