feat: clarify profiles and workspaces

This commit is contained in:
Michael Lam
2026-05-15 19:41:02 -07:00
committed by Hermes Agent
parent dbd2c79891
commit b373f090bd
3 changed files with 71 additions and 1 deletions
+37 -1
View File
@@ -4465,8 +4465,22 @@ async function loadProfilesPanel() {
const data = await api('/api/profiles');
_profilesCache = data;
panel.innerHTML = '';
const explainer = document.createElement('div');
explainer.className = 'profile-card profile-help-card';
explainer.innerHTML = `
<div class="profile-card-header">
<div style="min-width:0;flex:1">
<div class="profile-card-name">Profiles vs workspaces</div>
<div class="profile-card-meta">Use profiles for how the agent works; use workspaces for what files it works on.</div>
</div>
</div>`;
explainer.onclick = () => _renderProfileConceptHelp(data.active || 'default');
panel.appendChild(explainer);
if (!data.profiles || !data.profiles.length) {
panel.innerHTML = `<div style="padding:16px;color:var(--muted);font-size:12px">${esc(t('profiles_no_profiles'))}</div>`;
const emptyMsg = document.createElement('div');
emptyMsg.style.cssText = 'padding:16px;color:var(--muted);font-size:12px';
emptyMsg.textContent = t('profiles_no_profiles');
panel.appendChild(emptyMsg);
if (_profileMode !== 'create') _clearProfileDetail();
return;
}
@@ -4509,6 +4523,28 @@ async function loadProfilesPanel() {
}
}
function _renderProfileConceptHelp(activeName){
const title = $('profileDetailTitle');
const body = $('profileDetailBody');
const empty = $('profileDetailEmpty');
if (!title || !body) return;
title.textContent = 'Profiles vs workspaces';
body.innerHTML = `
<div class="main-view-content">
<div class="detail-card">
<div class="detail-card-title">Use profiles for how; workspaces for what</div>
<div class="detail-row"><div class="detail-row-label">Profiles</div><div class="detail-row-value">Agent identity, memory, skills, model/provider config, and connected tools. Create profiles for roles like researcher, writer, marketer, or developer when those roles should carry different context or capabilities.</div></div>
<div class="detail-row"><div class="detail-row-label">Workspaces</div><div class="detail-row-value">Project or product folders on disk. Use one workspace per repo/product so chat, terminal, and file browsing point at the right files.</div></div>
<div class="detail-row"><div class="detail-row-label">Together</div><div class="detail-row-value">A profile can have a default workspace, but you can still switch workspaces for a session. Profiles answer who is working?; workspaces answer where are they working?</div></div>
</div>
</div>`;
body.style.display = '';
if (empty) empty.style.display = 'none';
_profileMode = 'read';
_currentProfileDetail = null;
_setProfileHeaderButtons('empty');
}
function _renderProfileDetail(p, activeName){
_currentProfileDetail = p;
const title = $('profileDetailTitle');