adds schema design
This commit is contained in:
@@ -316,6 +316,141 @@
|
||||
</div>
|
||||
</sc-if>
|
||||
|
||||
<!-- schema overlay -->
|
||||
<sc-if value="{{ schemaOpen }}" hint-placeholder-val="{{ false }}">
|
||||
<div data-screen-label="Schema" style="position:fixed;inset:0;background:#101720;z-index:45;display:flex;flex-direction:column;min-width:900px">
|
||||
<div style="height:44px;flex:none;background:#18202B;border-bottom:1px solid #232C39;display:flex;align-items:center;gap:14px;padding:0 14px">
|
||||
<span style="font:700 11px/1 'IBM Plex Mono',monospace;letter-spacing:.14em;text-transform:uppercase;color:#828D9A;white-space:nowrap">[ schema ]</span>
|
||||
<span style="display:flex;align-items:center;gap:6px;font:500 12px/1 'IBM Plex Mono',monospace;color:#E8913A;white-space:nowrap"><x-import component-from-global-scope="BlijnderKadeDesignSystem_e2fd65.Icon" name="database" size="{{ 13 }}" hint-size="13px,13px"></x-import>mysql · odynt</span>
|
||||
<span style="font:400 12px/1 'IBM Plex Mono',monospace;color:#828D9A;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0">{{ sMeta }}</span>
|
||||
<span style="flex:1"></span>
|
||||
<button type="button" title="Open the command in the editor" onClick="{{ openSchemaCmd }}" style="border:none;background:transparent;padding:4px 0;font:400 12px/1 'IBM Plex Mono',monospace;color:#828D9A;cursor:pointer;white-space:nowrap" style-hover="color:#F4F5F4">app/Console/Commands/HelderSchemaCommand.php</button>
|
||||
<button type="button" onClick="{{ runSchema }}" style="display:flex;align-items:center;gap:7px;height:28px;padding:0 12px;border:none;border-radius:2px;background:#E8913A;color:#101720;font:600 12px/1 'IBM Plex Sans',sans-serif;cursor:pointer;white-space:nowrap" style-hover="background:#C4741F"><x-import component-from-global-scope="BlijnderKadeDesignSystem_e2fd65.Icon" name="terminal" size="{{ 14 }}" hint-size="14px,14px"></x-import>{{ sRunLabel }}</button>
|
||||
<button type="button" onClick="{{ closeSchema }}" style="display:flex;align-items:center;gap:7px;height:28px;padding:0 11px;border:1px solid #232C39;border-radius:2px;background:transparent;color:#BAC0C0;font:500 12px/1 'IBM Plex Sans',sans-serif;cursor:pointer;white-space:nowrap" style-hover="color:#F4F5F4;border-color:#3A424C"><x-import component-from-global-scope="BlijnderKadeDesignSystem_e2fd65.Icon" name="minimize-2" size="{{ 14 }}" hint-size="14px,14px"></x-import>Close<span style="font:600 11px/1 'IBM Plex Mono',monospace;color:#E8913A">⌘D</span></button>
|
||||
</div>
|
||||
<div style="flex:1;min-height:0;display:flex">
|
||||
<sc-if value="{{ hasSchema }}" hint-placeholder-val="{{ false }}">
|
||||
<div style="width:240px;flex:none;border-right:1px solid #232C39;background:#18202B;display:flex;flex-direction:column;min-height:0">
|
||||
<div style="height:44px;flex:none;display:flex;align-items:center;gap:8px;padding:0 12px 0 14px;border-bottom:1px solid #232C39">
|
||||
<span style="color:#828D9A;display:flex"><x-import component-from-global-scope="BlijnderKadeDesignSystem_e2fd65.Icon" name="search" size="{{ 14 }}" hint-size="14px,14px"></x-import></span>
|
||||
<input value="{{ sQ }}" onChange="{{ onSQ }}" onKeyDown="{{ onSQKey }}" placeholder="Find a table" spellCheck="false" style="flex:1;min-width:0;border:none;outline:none;background:transparent;padding:0;font:400 13px/1 'IBM Plex Mono',monospace;color:#F4F5F4">
|
||||
</div>
|
||||
<div style="height:34px;flex:none;display:flex;align-items:center;padding:0 14px;font:700 10px/1 'IBM Plex Mono',monospace;letter-spacing:.14em;text-transform:uppercase;color:#6C7783">{{ sListLabel }}</div>
|
||||
<div style="flex:1;min-height:0;overflow:auto;padding-bottom:12px;display:flex;flex-direction:column">
|
||||
<sc-for list="{{ sList }}" as="it" hint-placeholder-count="8">
|
||||
<button type="button" onClick="{{ it.onClick }}" onMouseEnter="{{ it.onEnter }}" onMouseLeave="{{ it.onLeave }}" style="height:30px;flex:none;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px;padding:0 14px 0 11px;border:none;border-left:3px solid {{ it.bar }};background:{{ it.bg }};text-align:left;cursor:pointer" style-hover="background:#1F2834">
|
||||
<span style="font:400 12px/1 'IBM Plex Mono',monospace;color:{{ it.color }};overflow:hidden;text-overflow:ellipsis;white-space:nowrap">{{ it.name }}</span>
|
||||
<span style="font:400 11px/1 'IBM Plex Mono',monospace;color:#6C7783;white-space:nowrap">{{ it.rows }}</span>
|
||||
</button>
|
||||
</sc-for>
|
||||
</div>
|
||||
</div>
|
||||
</sc-if>
|
||||
<div ref="{{ schemaCanvasRef }}" onMouseDown="{{ sBgDown }}" style="position:relative;flex:1;min-width:0;overflow:hidden;background:#101720;cursor:{{ sCursor }}">
|
||||
<sc-if value="{{ noSchema }}" hint-placeholder-val="{{ true }}">
|
||||
<div style="position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:24px">
|
||||
<div style="max-width:440px;display:flex;flex-direction:column;gap:16px">
|
||||
<span style="font:700 11px/1 'IBM Plex Mono',monospace;letter-spacing:.14em;text-transform:uppercase;color:#E8913A">[ no dump yet ]</span>
|
||||
<div style="font:400 15px/1.6 'IBM Plex Sans',sans-serif;color:#BAC0C0;text-wrap:pretty">— Helder draws the schema from <span style="font-family:'IBM Plex Mono',monospace;color:#F4F5F4">storage/helder/schema.json</span>. Run the command to write it.</div>
|
||||
<div style="display:flex;align-items:center;gap:14px;flex-wrap:wrap">
|
||||
<button type="button" onClick="{{ runSchema }}" style="height:36px;padding:0 16px;border:none;border-radius:2px;background:#E8913A;color:#101720;font:600 13px/1 'IBM Plex Sans',sans-serif;cursor:pointer" style-hover="background:#C4741F">{{ sRunLabel }}</button>
|
||||
<span style="font:400 12px/1 'IBM Plex Mono',monospace;color:#6C7783">$ php artisan helder:schema</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</sc-if>
|
||||
<sc-if value="{{ hasSchema }}" hint-placeholder-val="{{ false }}">
|
||||
<div style="position:absolute;left:0;top:0;transform-origin:0 0;transform:{{ sTransform }}">
|
||||
{{ sEdgesEl }}
|
||||
<sc-for list="{{ sTables }}" as="t" hint-placeholder-count="0">
|
||||
<div onMouseDown="{{ t.onDown }}" onMouseEnter="{{ t.onEnter }}" onMouseLeave="{{ t.onLeave }}" style="position:absolute;left:{{ t.x }}px;top:{{ t.y }}px;width:240px;box-sizing:border-box;background:#18202B;border:1px solid {{ t.border }};border-radius:4px;opacity:{{ t.op }};cursor:{{ t.cursor }};user-select:none;transition:opacity 160ms cubic-bezier(0.22,1,0.36,1),border-color 160ms cubic-bezier(0.22,1,0.36,1)">
|
||||
<div style="height:33px;box-sizing:border-box;border-bottom:1px solid #232C39;display:flex;align-items:center;gap:8px;padding:0 10px;background:{{ t.headBg }}">
|
||||
<span style="flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:700 12px/1 'IBM Plex Mono',monospace;color:{{ t.nameColor }}">{{ t.name }}</span>
|
||||
<span style="font:400 11px/1 'IBM Plex Mono',monospace;color:#6C7783;white-space:nowrap">{{ t.rows }}</span>
|
||||
</div>
|
||||
<sc-for list="{{ t.cols }}" as="c" hint-placeholder-count="4">
|
||||
<div onMouseEnter="{{ c.onEnter }}" onMouseLeave="{{ c.onLeave }}" style="height:22px;display:grid;grid-template-columns:20px minmax(0,1fr) auto;align-items:center;gap:6px;padding:0 10px;background:{{ c.bg }}">
|
||||
<span style="font:700 9px/1 'IBM Plex Mono',monospace;letter-spacing:.06em;color:{{ c.keyColor }}">{{ c.key }}</span>
|
||||
<span style="font:400 12px/1 'IBM Plex Mono',monospace;color:{{ c.nameColor }};overflow:hidden;text-overflow:ellipsis;white-space:nowrap">{{ c.n }}</span>
|
||||
<span style="font:400 11px/1 'IBM Plex Mono',monospace;color:#6C7783;white-space:nowrap">{{ c.t }}</span>
|
||||
</div>
|
||||
</sc-for>
|
||||
</div>
|
||||
</sc-for>
|
||||
</div>
|
||||
<div style="position:absolute;left:14px;bottom:14px;font:400 11px/1 'IBM Plex Mono',monospace;color:#6C7783;pointer-events:none">drag to pan · ⌘ scroll to zoom · hover a table or a key to trace it · click to inspect</div>
|
||||
<div onMouseDown="{{ sStop }}" style="position:absolute;right:14px;bottom:14px;display:flex;border:1px solid #232C39;border-radius:2px;background:#18202B;overflow:hidden">
|
||||
<button type="button" title="Zoom out" onClick="{{ sZoomOut }}" style="width:30px;height:28px;border:none;background:transparent;color:#BAC0C0;cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0" style-hover="color:#F4F5F4;background:#232C39"><x-import component-from-global-scope="BlijnderKadeDesignSystem_e2fd65.Icon" name="minus" size="{{ 14 }}" hint-size="14px,14px"></x-import></button>
|
||||
<span style="width:52px;display:flex;align-items:center;justify-content:center;border-left:1px solid #232C39;border-right:1px solid #232C39;font:500 11px/1 'IBM Plex Mono',monospace;color:#828D9A">{{ sZoomPct }}</span>
|
||||
<button type="button" title="Zoom in" onClick="{{ sZoomIn }}" style="width:30px;height:28px;border:none;background:transparent;color:#BAC0C0;cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0" style-hover="color:#F4F5F4;background:#232C39"><x-import component-from-global-scope="BlijnderKadeDesignSystem_e2fd65.Icon" name="plus" size="{{ 14 }}" hint-size="14px,14px"></x-import></button>
|
||||
<button type="button" title="Fit the whole schema" onClick="{{ sFitAll }}" style="height:28px;padding:0 11px;border:none;border-left:1px solid #232C39;background:transparent;color:#BAC0C0;cursor:pointer;font:500 12px/1 'IBM Plex Sans',sans-serif" style-hover="color:#F4F5F4;background:#232C39">Fit</button>
|
||||
</div>
|
||||
</sc-if>
|
||||
</div>
|
||||
<sc-if value="{{ sHasSel }}" hint-placeholder-val="{{ false }}">
|
||||
<div style="width:320px;flex:none;border-left:1px solid #232C39;background:#18202B;display:flex;flex-direction:column;min-height:0">
|
||||
<div style="height:44px;flex:none;display:flex;align-items:center;gap:10px;padding:0 10px 0 16px;border-bottom:1px solid #232C39">
|
||||
<span style="flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:700 13px/1 'IBM Plex Mono',monospace;color:#F4F5F4">{{ selName }}</span>
|
||||
<span style="font:400 11px/1 'IBM Plex Mono',monospace;color:#828D9A;white-space:nowrap">{{ selRows }}</span>
|
||||
<button type="button" title="Close (Esc)" onClick="{{ closeSel }}" style="border:none;background:transparent;color:#828D9A;cursor:pointer;padding:4px;display:flex" style-hover="color:#F4F5F4"><x-import component-from-global-scope="BlijnderKadeDesignSystem_e2fd65.Icon" name="x" size="{{ 14 }}" hint-size="14px,14px"></x-import></button>
|
||||
</div>
|
||||
<div style="flex:1;min-height:0;overflow:auto;display:flex;flex-direction:column;gap:20px;padding:14px 0 20px">
|
||||
<div style="display:flex;flex-direction:column">
|
||||
<div style="padding:0 16px 8px;font:700 10px/1 'IBM Plex Mono',monospace;letter-spacing:.14em;text-transform:uppercase;color:#6C7783">[ columns ] {{ selColCount }}</div>
|
||||
<sc-for list="{{ selCols }}" as="c" hint-placeholder-count="6">
|
||||
<div style="display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 10px;padding:7px 16px;border-top:1px solid #232C39">
|
||||
<span style="font:500 12px/1.4 'IBM Plex Mono',monospace;color:#E4E7E6;overflow:hidden;text-overflow:ellipsis;white-space:nowrap">{{ c.n }}</span>
|
||||
<span style="font:400 11px/1.4 'IBM Plex Mono',monospace;color:#828D9A;white-space:nowrap">{{ c.t }}</span>
|
||||
<span style="grid-column:1 / -1;font:400 11px/1.4 'IBM Plex Mono',monospace;color:{{ c.flagColor }}">{{ c.flag }}</span>
|
||||
</div>
|
||||
</sc-for>
|
||||
</div>
|
||||
<sc-if value="{{ selHasOut }}" hint-placeholder-val="{{ false }}">
|
||||
<div style="display:flex;flex-direction:column">
|
||||
<div style="padding:0 16px 8px;font:700 10px/1 'IBM Plex Mono',monospace;letter-spacing:.14em;text-transform:uppercase;color:#6C7783">[ belongs to ]</div>
|
||||
<sc-for list="{{ selOut }}" as="r" hint-placeholder-count="2">
|
||||
<button type="button" onClick="{{ r.onClick }}" onMouseEnter="{{ r.onEnter }}" onMouseLeave="{{ r.onLeave }}" style="display:flex;align-items:center;gap:8px;padding:8px 16px;border:none;border-top:1px solid #232C39;background:transparent;text-align:left;cursor:pointer;font:400 12px/1 'IBM Plex Mono',monospace" style-hover="background:#1F2834"><span style="color:#E8913A">→</span><span style="color:#F4F5F4">{{ r.table }}</span><span style="flex:1"></span><span style="color:#828D9A">via {{ r.via }}</span></button>
|
||||
</sc-for>
|
||||
</div>
|
||||
</sc-if>
|
||||
<sc-if value="{{ selHasIn }}" hint-placeholder-val="{{ false }}">
|
||||
<div style="display:flex;flex-direction:column">
|
||||
<div style="padding:0 16px 8px;font:700 10px/1 'IBM Plex Mono',monospace;letter-spacing:.14em;text-transform:uppercase;color:#6C7783">[ has many ]</div>
|
||||
<sc-for list="{{ selIn }}" as="r" hint-placeholder-count="2">
|
||||
<button type="button" onClick="{{ r.onClick }}" onMouseEnter="{{ r.onEnter }}" onMouseLeave="{{ r.onLeave }}" style="display:flex;align-items:center;gap:8px;padding:8px 16px;border:none;border-top:1px solid #232C39;background:transparent;text-align:left;cursor:pointer;font:400 12px/1 'IBM Plex Mono',monospace" style-hover="background:#1F2834"><span style="color:#E8913A">←</span><span style="color:#F4F5F4">{{ r.table }}</span><span style="flex:1"></span><span style="color:#828D9A">via {{ r.via }}</span></button>
|
||||
</sc-for>
|
||||
</div>
|
||||
</sc-if>
|
||||
<sc-if value="{{ selNoRel }}" hint-placeholder-val="{{ false }}">
|
||||
<div style="padding:0 16px;font:400 13px/1.6 'IBM Plex Sans',sans-serif;color:#828D9A">— No foreign keys in or out.</div>
|
||||
</sc-if>
|
||||
</div>
|
||||
<div style="flex:none;display:flex;gap:8px;padding:12px 16px;border-top:1px solid #232C39">
|
||||
<button type="button" onClick="{{ selPass }}" style="flex:1;height:30px;border:1px solid #3A424C;border-radius:2px;background:transparent;color:#BAC0C0;font:500 12px/1 'IBM Plex Sans',sans-serif;cursor:pointer" style-hover="border-color:#6C7783;background:#232C39;color:#F4F5F4">Pass on to Claude</button>
|
||||
<button type="button" onClick="{{ selCopy }}" style="flex:1;height:30px;border:1px solid #3A424C;border-radius:2px;background:transparent;color:#BAC0C0;font:500 12px/1 'IBM Plex Sans',sans-serif;cursor:pointer" style-hover="border-color:#6C7783;background:#232C39;color:#F4F5F4">Copy name</button>
|
||||
</div>
|
||||
</div>
|
||||
</sc-if>
|
||||
</div>
|
||||
<sc-if value="{{ hasSlog }}" hint-placeholder-val="{{ false }}">
|
||||
<div style="height:150px;flex:none;border-top:1px solid #232C39;background:#18202B;display:flex;flex-direction:column;min-height:0">
|
||||
<div style="height:32px;flex:none;display:flex;align-items:center;gap:12px;padding:0 12px 0 16px;font:700 10px/1 'IBM Plex Mono',monospace;letter-spacing:.14em;text-transform:uppercase;color:#6C7783">
|
||||
<span>[ console ] artisan</span>
|
||||
<span style="flex:1"></span>
|
||||
<button type="button" title="Hide console" onClick="{{ hideSlog }}" style="border:none;background:transparent;color:#828D9A;cursor:pointer;padding:4px;display:flex" style-hover="color:#F4F5F4"><x-import component-from-global-scope="BlijnderKadeDesignSystem_e2fd65.Icon" name="chevron-down" size="{{ 14 }}" hint-size="14px,14px"></x-import></button>
|
||||
</div>
|
||||
<div style="flex:1;min-height:0;overflow:auto;display:flex;flex-direction:column-reverse;padding:0 16px 12px">
|
||||
<div style="font:400 12px/1.6 'IBM Plex Mono',monospace">
|
||||
<sc-for list="{{ slogLines }}" as="l" hint-placeholder-count="3">
|
||||
<div style="white-space:pre-wrap;word-break:break-all;color:{{ l.color }}">{{ l.t }}</div>
|
||||
</sc-for>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</sc-if>
|
||||
</div>
|
||||
</sc-if>
|
||||
|
||||
<!-- git overlay -->
|
||||
<sc-if value="{{ gitOpen }}" hint-placeholder-val="{{ false }}">
|
||||
<div style="position:fixed;inset:0;background:#101720;z-index:44;display:flex;flex-direction:column;min-width:900px">
|
||||
@@ -808,6 +943,46 @@ exit($status);`);
|
||||
Expertise infrastructure for independent experts.
|
||||
|
||||
Run \`composer run dev\` and open https://odynt.test.`);
|
||||
put('app/Console/Commands/HelderSchemaCommand.php', `<?php
|
||||
|
||||
namespace App\\Console\\Commands;
|
||||
|
||||
use Illuminate\\Console\\Command;
|
||||
use Illuminate\\Support\\Facades\\File;
|
||||
use Illuminate\\Support\\Facades\\Schema;
|
||||
|
||||
class HelderSchemaCommand extends Command
|
||||
{
|
||||
protected $signature = 'helder:schema {--connection= : Database connection to read}';
|
||||
|
||||
protected $description = 'Dump the database schema for Helder to visualise.';
|
||||
|
||||
public function handle(): int
|
||||
{
|
||||
$connection = $this->option('connection') ?? config('database.default');
|
||||
$schema = Schema::connection($connection);
|
||||
|
||||
$tables = collect($schema->getTables())
|
||||
->reject(fn ($t) => in_array($t['name'], ['migrations', 'jobs', 'cache', 'sessions']))
|
||||
->map(fn ($t) => [
|
||||
'name' => $t['name'],
|
||||
'columns' => $schema->getColumns($t['name']),
|
||||
'indexes' => $schema->getIndexes($t['name']),
|
||||
'foreign_keys' => $schema->getForeignKeys($t['name']),
|
||||
])->values();
|
||||
|
||||
File::ensureDirectoryExists(storage_path('helder'));
|
||||
File::put(storage_path('helder/schema.json'), json_encode([
|
||||
'connection' => $connection,
|
||||
'generated_at' => now()->toIso8601String(),
|
||||
'tables' => $tables,
|
||||
], JSON_PRETTY_PRINT));
|
||||
|
||||
$this->components->info('Schema dumped to storage/helder/schema.json');
|
||||
|
||||
return self::SUCCESS;
|
||||
}
|
||||
}`);
|
||||
put('vite.config.js', `import { defineConfig } from 'vite';
|
||||
import laravel from 'laravel-vite-plugin';
|
||||
|
||||
@@ -843,6 +1018,7 @@ AI_MODEL=claude-opus-5-5`);
|
||||
{ t: 'Environment reset and seeded successfully.', c: '#8FBFB4' }
|
||||
], termInput: '', history: [],
|
||||
commits: [], ahead: 0, commitMsg: '', note: '',
|
||||
schemaOpen: false, schema: null, sPos: {}, sView: { x: 0, y: 0, k: 1 }, sHover: null, sCol: null, sSel: null, sQ: '', slog: [], slogOpen: true, sBusy: false, sDumped: null, sDragging: null,
|
||||
gitOpen: false, gitSec: {}, branches: [BR, 'main', 'ontwikkeling/2026-09-28-004-vault-sharing'], remotes: ['main', BR, 'ontwikkeling/2026-09-28-004-vault-sharing', 'ontwikkeling/2026-10-02-005-mcp-rate-limits', 'release/2026.10'], gitOpenFiles: [], behind: 2, pulled: false, gBusy: null, gInput: '', gHist: [],
|
||||
glog: [{ t: '$ git fetch origin', c: '#F4F5F4' }, { t: 'From github.com:blijnder/odynt', c: '#BAC0C0' }, { t: ' 4be21a9..7a1e0f2 ' + BR + ' -> origin/' + BR, c: '#BAC0C0' }]
|
||||
};
|
||||
@@ -986,8 +1162,169 @@ return [
|
||||
push() { const a = this.state.ahead; if (!a) { this.toast('— Nothing to push. Branch is up to date.'); return; } this.setState({ ahead: 0 }); this.toast('Pushed ' + a + (a === 1 ? ' commit' : ' commits') + ' to origin/' + this.state.BR); }
|
||||
openDiff(p) { this.setState({ menu: null, diffPath: p }); }
|
||||
|
||||
// ---------- schema (full screen, only when the app has helder:schema) ----------
|
||||
CMD = 'app/Console/Commands/HelderSchemaCommand.php';
|
||||
hasSchemaCmd() { const f = this.state.files[this.CMD]; return !!(f && f.content !== null); }
|
||||
toggleSchema() { const o = !this.state.schemaOpen; this.setState({ schemaOpen: o, gitOpen: false, menu: null }); }
|
||||
schemaData() {
|
||||
const T = [
|
||||
[0, 'team_user', 1590, 'id:bigint:pk|team_id:bigint:fk=teams|user_id:bigint:fk=users|role:varchar(32)|created_at:timestamp:null'],
|
||||
[0, 'mcp_tokens', 88, 'id:bigint:pk|user_id:bigint:fk=users|agent_id:bigint:fk=agents:null|name:varchar(255)|token_hash:char(64):uq|last_used_at:timestamp:null|revoked_at:timestamp:null|created_at:timestamp:null'],
|
||||
[1, 'users', 1284, 'id:bigint:pk|name:varchar(255)|email:varchar(255):uq|email_verified_at:timestamp:null|password:varchar(255)|current_team_id:bigint:fk=teams:null|created_at:timestamp:null|updated_at:timestamp:null'],
|
||||
[1, 'teams', 312, 'id:bigint:pk|user_id:bigint:fk=users|name:varchar(255)|personal_team:bool|created_at:timestamp:null|updated_at:timestamp:null'],
|
||||
[2, 'agents', 146, 'id:bigint:pk|team_id:bigint:fk=teams|name:varchar(255)|slug:varchar(255):uq|model:varchar(64)|system_prompt:text|compression:varchar(16)|cache_history:bool|created_at:timestamp:null|updated_at:timestamp:null'],
|
||||
[2, 'agent_vault', 402, 'agent_id:bigint:fk=agents|vault_id:bigint:fk=vaults|usage_scope:varchar(16)'],
|
||||
[2, 'conversations', 9812, 'id:bigint:pk|agent_id:bigint:fk=agents|user_id:bigint:fk=users|title:varchar(255):null|created_at:timestamp:null|updated_at:timestamp:null'],
|
||||
[2, 'messages', 214330, 'id:bigint:pk|conversation_id:bigint:fk=conversations|role:varchar(16)|content:longtext|input_tokens:int:null|output_tokens:int:null|cache_read_tokens:int:null|created_at:timestamp:null'],
|
||||
[3, 'vaults', 97, 'id:bigint:pk|team_id:bigint:fk=teams|name:varchar(255)|mcp_accessible:bool|created_at:timestamp:null|updated_at:timestamp:null'],
|
||||
[3, 'vault_documents', 3410, 'id:bigint:pk|vault_id:bigint:fk=vaults|title:varchar(255)|path:varchar(255)|mime:varchar(64)|bytes:int|created_at:timestamp:null'],
|
||||
[3, 'document_chunks', 61207, 'id:bigint:pk|vault_document_id:bigint:fk=vault_documents|position:int|content:text|embedding:vector(1536)'],
|
||||
[4, 'flows', 54, 'id:bigint:pk|team_id:bigint:fk=teams|name:varchar(255)|trigger:varchar(32)|created_at:timestamp:null|updated_at:timestamp:null'],
|
||||
[4, 'flow_steps', 211, 'id:bigint:pk|flow_id:bigint:fk=flows|agent_id:bigint:fk=agents|position:int|instructions:text'],
|
||||
[4, 'flow_runs', 7020, 'id:bigint:pk|flow_id:bigint:fk=flows|user_id:bigint:fk=users:null|status:varchar(16)|started_at:timestamp|finished_at:timestamp:null'],
|
||||
[4, 'flow_connector', 61, 'flow_id:bigint:fk=flows|connector_id:bigint:fk=connectors'],
|
||||
[4, 'connectors', 39, 'id:bigint:pk|team_id:bigint:fk=teams|type:varchar(32)|name:varchar(255)|credentials:text|created_at:timestamp:null']
|
||||
];
|
||||
const tables = [], edges = [], pos = {}, laneY = [0, 0, 0, 0, 0], lane = {};
|
||||
T.forEach(([ln, name, rows, spec]) => {
|
||||
const cols = spec.split('|').map(c => { const [n, t, ...f] = c.split(':'); const fk = (f.find(x => x.startsWith('fk=')) || '').slice(3) || null; return { n, t, pk: f.includes('pk'), uq: f.includes('uq'), nul: f.includes('null'), fk }; });
|
||||
cols.forEach((c, ci) => { if (c.fk) edges.push({ from: name, col: c.n, ci, to: c.fk }); });
|
||||
tables.push({ name, rows, cols }); lane[name] = ln; pos[name] = { x: 40 + ln * 340, y: laneY[ln] }; laneY[ln] += 35 + cols.length * 22 + 48;
|
||||
});
|
||||
const maxH = Math.max(...laneY);
|
||||
tables.forEach(t => { pos[t.name].y += 40 + Math.round((maxH - laneY[lane[t.name]]) / 2); });
|
||||
return { schema: { tables, edges }, pos };
|
||||
}
|
||||
sTmap() { const m = {}; (this.state.schema ? this.state.schema.tables : []).forEach(t => { m[t.name] = t; }); return m; }
|
||||
sPath(e, pos, tm) {
|
||||
const W = 240, a = pos[e.from], b = pos[e.to], bi = Math.max(0, tm[e.to].cols.findIndex(c => c.pk));
|
||||
const y1 = a.y + 45 + e.ci * 22, y2 = b.y + 45 + bi * 22, ac = a.x + W / 2, bc = b.x + W / 2;
|
||||
let x1, x2, c1, c2;
|
||||
if (Math.abs(ac - bc) < W) { x1 = a.x + W; x2 = b.x + W; const o = 46 + Math.abs(y2 - y1) * 0.12; c1 = x1 + o; c2 = x2 + o; }
|
||||
else if (bc > ac) { x1 = a.x + W; x2 = b.x; const d = Math.max(40, (x2 - x1) / 2); c1 = x1 + d; c2 = x2 - d; }
|
||||
else { x1 = a.x; x2 = b.x + W; const d = Math.max(40, (x1 - x2) / 2); c1 = x1 - d; c2 = x2 + d; }
|
||||
return { d: 'M' + x1 + ',' + y1 + ' C' + c1 + ',' + y1 + ' ' + c2 + ',' + y2 + ' ' + x2 + ',' + y2, x1, y1, x2, y2 };
|
||||
}
|
||||
sBounds() {
|
||||
const P = this.state.sPos; let x0 = Infinity, y0 = Infinity, x1 = -Infinity, y1 = -Infinity;
|
||||
this.state.schema.tables.forEach(t => { const p = P[t.name]; x0 = Math.min(x0, p.x); y0 = Math.min(y0, p.y); x1 = Math.max(x1, p.x + 240); y1 = Math.max(y1, p.y + 35 + t.cols.length * 22); });
|
||||
return { x0, y0, x1, y1 };
|
||||
}
|
||||
sRect() { return this._sc ? this._sc.getBoundingClientRect() : null; }
|
||||
sFit() {
|
||||
const r = this.sRect(); if (!r || !this.state.schema) return;
|
||||
const b = this.sBounds(), bw = b.x1 - b.x0 + 60, bh = b.y1 - b.y0;
|
||||
const k = Math.min(1.1, Math.max(0.3, Math.min((r.width - 96) / bw, (r.height - 96) / bh)));
|
||||
this.setState({ sView: { k, x: (r.width - bw * k) / 2 - b.x0 * k, y: (r.height - bh * k) / 2 - b.y0 * k } });
|
||||
}
|
||||
sZoom(f, mx, my) {
|
||||
const r = this.sRect(); if (!r) return; const v = this.state.sView, k = Math.min(2, Math.max(0.3, v.k * f));
|
||||
if (mx == null) { mx = r.width / 2; my = r.height / 2; }
|
||||
this.setState({ sView: { k, x: mx - (mx - v.x) * k / v.k, y: my - (my - v.y) * k / v.k } });
|
||||
}
|
||||
sCenter(name) {
|
||||
const r = this.sRect(), t = this.sTmap()[name]; if (!r || !t) return;
|
||||
const p = this.state.sPos[name], k = this.state.sView.k, w = r.width - (this.state.sSel ? 0 : 320);
|
||||
this.setState({ sSel: name, sHover: null, sView: { k, x: Math.round(w / 2 - (p.x + 120) * k), y: Math.round(r.height / 2 - (p.y + (35 + t.cols.length * 22) / 2) * k) } });
|
||||
}
|
||||
schemaCanvasRef = el => {
|
||||
if (this._sc && this._sc !== el) this._sc.removeEventListener('wheel', this.onSchemaWheel);
|
||||
if (el && el !== this._sc) el.addEventListener('wheel', this.onSchemaWheel, { passive: false });
|
||||
this._sc = el;
|
||||
};
|
||||
onSchemaWheel = ev => {
|
||||
if (!this.state.schema) return; ev.preventDefault();
|
||||
const r = this.sRect(), v = this.state.sView;
|
||||
if (ev.ctrlKey || ev.metaKey) this.sZoom(Math.exp(-ev.deltaY * 0.01), ev.clientX - r.left, ev.clientY - r.top);
|
||||
else this.setState({ sView: { ...v, x: v.x - ev.deltaX, y: v.y - ev.deltaY } });
|
||||
};
|
||||
sDown(ev, name) {
|
||||
if (ev.button !== 0 || !this.state.schema) return; ev.stopPropagation();
|
||||
const v = this.state.sView, p = name && this.state.sPos[name];
|
||||
this.sDrag = name ? { mode: 't', name, sx: ev.clientX, sy: ev.clientY, ox: p.x, oy: p.y, moved: false } : { mode: 'p', sx: ev.clientX, sy: ev.clientY, vx: v.x, vy: v.y, moved: false };
|
||||
window.addEventListener('mousemove', this.sMove); window.addEventListener('mouseup', this.sUp);
|
||||
}
|
||||
sMove = ev => {
|
||||
const d = this.sDrag; if (!d) return; const dx = ev.clientX - d.sx, dy = ev.clientY - d.sy;
|
||||
if (!d.moved) { if (Math.abs(dx) + Math.abs(dy) < 4) return; d.moved = true; this.setState({ sDragging: d.mode }); }
|
||||
if (d.mode === 't') { const k = this.state.sView.k; this.setState(s => ({ sPos: { ...s.sPos, [d.name]: { x: Math.round(d.ox + dx / k), y: Math.round(d.oy + dy / k) } } })); }
|
||||
else this.setState(s => ({ sView: { ...s.sView, x: d.vx + dx, y: d.vy + dy } }));
|
||||
};
|
||||
sUp = () => {
|
||||
window.removeEventListener('mousemove', this.sMove); window.removeEventListener('mouseup', this.sUp);
|
||||
const d = this.sDrag; this.sDrag = null; if (!d) return;
|
||||
if (!d.moved) this.setState(s => ({ sSel: d.mode === 't' ? (s.sSel === d.name ? null : d.name) : null }));
|
||||
this.setState({ sDragging: null });
|
||||
};
|
||||
schemaRun() {
|
||||
if (this.state.sBusy) return;
|
||||
const sp = this.speed(), { schema, pos } = this.schemaData(), nc = schema.tables.reduce((a, t) => a + t.cols.length, 0);
|
||||
const add = (t, c) => this.setState(x => ({ slog: [...x.slog, { t, c: c || '#BAC0C0' }].slice(-200) }));
|
||||
this.setState(x => ({ sBusy: true, slogOpen: true, slog: [...x.slog, { t: '$ php artisan helder:schema', c: '#F4F5F4' }] }));
|
||||
[[260, ' Connection ............................ mysql · odynt'], [520, ' Tables ................................ ' + schema.tables.length], [700, ' Columns ............................... ' + nc], [880, ' Foreign keys .......................... ' + schema.edges.length], [1100, ' Wrote storage/helder/schema.json (18.4 KB)', '#8FBFB4']].forEach(([ms, t, c]) => this.later(() => add(t, c), ms * sp));
|
||||
this.later(() => {
|
||||
const first = !this.state.schema, d = new Date(), hm = String(d.getHours()).padStart(2, '0') + ':' + String(d.getMinutes()).padStart(2, '0');
|
||||
add(' DONE Schema dumped in 0.41s.', '#8FBFB4');
|
||||
this.setState(x => ({ sBusy: false, schema, sPos: first ? pos : x.sPos, sDumped: hm }));
|
||||
this.toast('Schema dumped · ' + schema.tables.length + ' tables');
|
||||
if (first) this.later(() => this.sFit(), 30);
|
||||
}, 1300 * sp);
|
||||
}
|
||||
schemaVals() {
|
||||
const s = this.state, sc = s.schema, fmt = n => n.toLocaleString('en-US');
|
||||
const base = {
|
||||
schemaOpen: s.schemaOpen && this.hasSchemaCmd(), closeSchema: () => this.setState({ schemaOpen: false }),
|
||||
runSchema: () => this.schemaRun(), sRunLabel: s.sBusy ? 'Dumping…' : (sc ? 'Re-run helder:schema' : 'Run helder:schema'),
|
||||
openSchemaCmd: () => { this.setState({ schemaOpen: false }); this.open(this.CMD); },
|
||||
schemaCanvasRef: this.schemaCanvasRef, sBgDown: ev => this.sDown(ev, null), sStop: ev => ev.stopPropagation(),
|
||||
hasSchema: !!sc, noSchema: !sc, sCursor: s.sDragging === 'p' ? 'grabbing' : (sc ? 'grab' : 'default'),
|
||||
slogLines: s.slog.map(l => ({ t: l.t, color: l.c })), hasSlog: s.slog.length > 0 && s.slogOpen, hideSlog: () => this.setState({ slogOpen: false }),
|
||||
sQ: s.sQ, onSQ: ev => this.setState({ sQ: ev.target.value })
|
||||
};
|
||||
if (!sc) return { ...base, sMeta: 'no dump yet', sTables: [], sList: [], sListLabel: '', sEdgesEl: null, sHasSel: false, sTransform: 'none', sZoomPct: '100%' };
|
||||
const tm = this.sTmap(), P = s.sPos, q = s.sQ.trim().toLowerCase(), match = n => !!q && n.includes(q);
|
||||
const focus = s.sHover || s.sSel, colF = s.sCol;
|
||||
const act = e => colF ? e.from + '.' + e.col === colF : !!focus && (e.from === focus || e.to === focus);
|
||||
const active = sc.edges.filter(act), rel = new Set(); active.forEach(e => { rel.add(e.from); rel.add(e.to); }); if (focus) rel.add(focus);
|
||||
const dimAll = !!(focus || colF), h = React.createElement, b = this.sBounds();
|
||||
const sorted = [...sc.edges].sort((x, y) => act(x) - act(y));
|
||||
const sEdgesEl = h('svg', { width: Math.max(1, b.x1 + 120), height: Math.max(1, b.y1 + 120), style: { position: 'absolute', left: 0, top: 0, overflow: 'visible', pointerEvents: 'none' } },
|
||||
sorted.map(e => { const g = this.sPath(e, P, tm), on = act(e), col = on ? '#E8913A' : (dimAll || q ? '#232C39' : '#3A424C'), w = on ? 1.75 : 1.25;
|
||||
return h('g', { key: e.from + '.' + e.col }, h('path', { d: g.d, fill: 'none', stroke: col, strokeWidth: w }), h('circle', { cx: g.x1, cy: g.y1, r: 3, fill: '#101720', stroke: col, strokeWidth: 1.5 }), h('circle', { cx: g.x2, cy: g.y2, r: 3, fill: col })); }));
|
||||
const sTables = sc.tables.map(t => {
|
||||
const n = t.name, isF = n === focus, op = dimAll ? (rel.has(n) ? 1 : 0.3) : (q ? (match(n) ? 1 : 0.3) : 1);
|
||||
return { name: n, x: P[n].x, y: P[n].y, op, rows: fmt(t.rows), cursor: s.sDragging === 't' ? 'grabbing' : 'pointer',
|
||||
border: isF ? '#E8913A' : s.sSel === n ? '#C4741F' : rel.has(n) ? '#6C7783' : match(n) ? '#F0B476' : '#232C39',
|
||||
headBg: isF || s.sSel === n ? 'rgba(232,145,58,.10)' : '#18202B', nameColor: isF || s.sSel === n ? '#F4F5F4' : '#E4E7E6',
|
||||
onDown: ev => this.sDown(ev, n), onEnter: () => { if (!s.sDragging) this.setState({ sHover: n }); }, onLeave: () => this.setState({ sHover: null, sCol: null }),
|
||||
cols: t.cols.map(c => { const hl = active.some(e => (e.from === n && e.col === c.n) || (e.to === n && c.pk));
|
||||
return { n: c.n, t: c.t + (c.nul ? '?' : ''), key: c.pk ? 'PK' : c.fk ? 'FK' : c.uq ? 'UQ' : '',
|
||||
keyColor: hl ? '#E8913A' : c.pk ? '#F0B476' : '#828D9A', nameColor: hl ? '#F4F5F4' : (c.pk || c.fk) ? '#E4E7E6' : '#BAC0C0', bg: hl ? 'rgba(232,145,58,.10)' : 'transparent',
|
||||
onEnter: c.fk ? () => { if (!s.sDragging) this.setState({ sCol: n + '.' + c.n }); } : undefined, onLeave: c.fk ? () => this.setState({ sCol: null }) : undefined }; }) };
|
||||
});
|
||||
const listed = sc.tables.filter(t => !q || match(t.name)).sort((x, y) => x.name.localeCompare(y.name));
|
||||
const sList = listed.map(t => { const n = t.name, on = n === s.sSel, hv = n === focus;
|
||||
return { name: n, rows: fmt(t.rows), bar: on ? '#E8913A' : 'transparent', bg: on ? 'rgba(232,145,58,.10)' : hv ? '#1F2834' : 'transparent', color: on || hv ? '#F4F5F4' : rel.has(n) && dimAll ? '#E4E7E6' : '#BAC0C0',
|
||||
onClick: () => this.sCenter(n), onEnter: () => this.setState({ sHover: n }), onLeave: () => this.setState({ sHover: null }) }; });
|
||||
const sel = s.sSel && tm[s.sSel], relRow = (table, via) => ({ table, via, onClick: () => this.sCenter(table), onEnter: () => this.setState({ sHover: table }), onLeave: () => this.setState({ sHover: null }) });
|
||||
const out = sel ? sc.edges.filter(e => e.from === sel.name).map(e => relRow(e.to, e.col)) : [], inn = sel ? sc.edges.filter(e => e.to === sel.name).map(e => relRow(e.from, e.col)) : [];
|
||||
return { ...base,
|
||||
sMeta: 'dumped ' + s.sDumped + ' · ' + sc.tables.length + ' tables · ' + sc.edges.length + ' relations', sEdgesEl, sTables, sList,
|
||||
sListLabel: q ? '[ tables ] ' + listed.length + ' of ' + sc.tables.length : '[ tables ] ' + sc.tables.length,
|
||||
onSQKey: ev => { if (ev.key === 'Enter' && listed.length) this.sCenter(listed[0].name); else if (ev.key === 'Escape') { ev.stopPropagation(); this.setState({ sQ: '' }); } },
|
||||
sTransform: 'translate(' + s.sView.x + 'px, ' + s.sView.y + 'px) scale(' + s.sView.k + ')', sZoomPct: Math.round(s.sView.k * 100) + '%',
|
||||
sZoomIn: () => this.sZoom(1.2), sZoomOut: () => this.sZoom(1 / 1.2), sFitAll: () => this.sFit(),
|
||||
sHasSel: !!sel, selName: sel ? sel.name : '', selRows: sel ? fmt(sel.rows) + ' rows' : '', selColCount: sel ? sel.cols.length : 0,
|
||||
selCols: sel ? sel.cols.map(c => { const fl = [c.pk && 'PRIMARY', c.fk && 'FK → ' + c.fk + '.id', c.uq && 'UNIQUE', c.nul ? 'NULL' : 'NOT NULL'].filter(Boolean).join(' · '); return { n: c.n, t: c.t, flag: fl, flagColor: c.pk || c.fk ? '#F0B476' : '#6C7783' }; }) : [],
|
||||
selOut: out, selIn: inn, selHasOut: out.length > 0, selHasIn: inn.length > 0, selNoRel: !!sel && !out.length && !inn.length,
|
||||
closeSel: () => this.setState({ sSel: null }),
|
||||
selPass: () => { const n = sel.name; this.setState({ schemaOpen: false }); this.passOn('@schema:' + n); },
|
||||
selCopy: () => this.copy(sel.name, 'Copied table name')
|
||||
};
|
||||
}
|
||||
|
||||
// ---------- git (full screen) ----------
|
||||
toggleGit() { const o = !this.state.gitOpen; this.setState({ gitOpen: o, menu: null }); if (o) this.later(() => this.gitMsgRef.current && this.gitMsgRef.current.focus(), 40); }
|
||||
toggleGit() { const o = !this.state.gitOpen; this.setState({ gitOpen: o, schemaOpen: false, menu: null }); if (o) this.later(() => this.gitMsgRef.current && this.gitMsgRef.current.focus(), 40); }
|
||||
glog_(cmd, out) { this.setState(s => ({ glog: [...s.glog, { t: '$ ' + cmd, c: '#F4F5F4' }, ...out.map(o => typeof o === 'string' ? { t: o, c: '#BAC0C0' } : o)].slice(-400) })); }
|
||||
glogAdd(out) { this.setState(s => ({ glog: [...s.glog, ...out.map(o => typeof o === 'string' ? { t: o, c: '#BAC0C0' } : o)].slice(-400) })); }
|
||||
gStage(ps, cmd) {
|
||||
@@ -1353,10 +1690,12 @@ Tell me to **bouw** it, or ask about one part.`
|
||||
else if (mod && k === '.') { e.preventDefault(); this.setState({ hidden: !s.hidden }); }
|
||||
else if (mod && k === 'l') { e.preventDefault(); this.setState({ fluid: !s.fluid }); }
|
||||
else if (mod && k === 'g') { e.preventDefault(); this.toggleGit(); }
|
||||
else if (mod && k === 'd' && this.hasSchemaCmd()) { e.preventDefault(); this.toggleSchema(); }
|
||||
else if (mod && ['1', '2', '3'].includes(k)) { e.preventDefault(); this.togglePanel(['explorer', 'file', 'claude'][+k - 1]); }
|
||||
else if (k === 'escape') {
|
||||
if (s.menu) this.setState({ menu: null }); else if (s.modal) this.setState({ modal: null });
|
||||
else if (s.search.open) this.setState(st => ({ search: { ...st.search, open: false } })); else if (s.diffPath) this.setState({ diffPath: null });
|
||||
else if (s.schemaOpen) this.setState(s.sSel ? { sSel: null } : { schemaOpen: false });
|
||||
else if (s.gitOpen) this.setState({ gitOpen: false });
|
||||
else if (s.running) this.interrupt();
|
||||
} else if (k === 'enter' && s.modal && s.modal.kind === 'confirm') { e.preventDefault(); this.confirmModal(); }
|
||||
@@ -1536,6 +1875,7 @@ Tell me to **bouw** it, or ask about one part.`
|
||||
const brGroups = [{ label: 'local', items: s.branches.map(b => brItem(b, false)) }, { label: 'remote · origin', items: s.remotes.map(b => brItem(b, true)) }];
|
||||
const gReady = stagedP.length > 0 && s.commitMsg.trim().length > 0;
|
||||
return {
|
||||
...this.schemaVals(),
|
||||
brGroups, brNote: dirty ? '— ' + dirty + ' uncommitted ' + (dirty === 1 ? 'file' : 'files') + ' · switching locked' : 'clean · click to switch', brNoteColor: dirty ? '#F0B476' : '#828D9A',
|
||||
gitOpen: s.gitOpen, closeGit: () => this.setState({ gitOpen: false }), gitPull: () => this.gPull(), gitPush: () => this.gPush(),
|
||||
pullText: s.gBusy === 'pull' ? 'Pulling…' : 'Pull', pushText: s.gBusy === 'push' ? 'Pushing…' : 'Push',
|
||||
@@ -1555,7 +1895,7 @@ Tell me to **bouw** it, or ask about one part.`
|
||||
clearGlog: ev => { ev.stopPropagation(); this.setState({ glog: [] }); },
|
||||
gBusyLabel: s.gBusy === 'push' ? '→ pushing to origin…' : (s.gBusy === 'pull' ? '→ pulling from origin…' : ''),
|
||||
branch: BR, crumbDir, crumbFile: cur ? this.base(cur) : '',
|
||||
panelBtns: [btn('Git' + (changed.length ? ' ' + changed.length : ''), s.gitOpen, () => this.toggleGit(), 0, '⌘G'), btn('Explorer', P.explorer, () => this.togglePanel('explorer'), 1, '⌘1'), btn('File', P.file, () => this.togglePanel('file'), 2, '⌘2'), btn('Claude', P.claude, () => this.togglePanel('claude'), 3, '⌘3')],
|
||||
panelBtns: [btn('Git' + (changed.length ? ' ' + changed.length : ''), s.gitOpen, () => this.toggleGit(), 0, '⌘G'), ...(this.hasSchemaCmd() ? [btn('Schema', s.schemaOpen, () => this.toggleSchema(), 1, '⌘D')] : []), btn('Explorer', P.explorer, () => this.togglePanel('explorer'), 1, '⌘1'), btn('File', P.file, () => this.togglePanel('file'), 2, '⌘2'), btn('Claude', P.claude, () => this.togglePanel('claude'), 3, '⌘3')],
|
||||
toolBtns: [
|
||||
{ label: 'Search', key: '⌘F', title: 'Search the project', hasDot: false, color: '#BAC0C0', bg: 'transparent', keyColor: '#E8913A', border: 'none', onClick: () => this.openSearch() },
|
||||
{ label: 'Fluid', key: '⌘L', title: 'Soft-wrap long lines', hasDot: true, dot: s.fluid ? '#E8913A' : '#3A424C', color: s.fluid ? '#F4F5F4' : '#828D9A', bg: s.fluid ? 'rgba(232,145,58,.10)' : 'transparent', keyColor: s.fluid ? '#E8913A' : '#6C7783', border: '1px solid #232C39', onClick: () => this.setState({ fluid: !s.fluid }) },
|
||||
@@ -1563,7 +1903,7 @@ Tell me to **bouw** it, or ask about one part.`
|
||||
{ label: s.note.trim() ? 'Note •' : 'Note', key: '⌘N', title: 'Scratch note', hasDot: false, color: '#BAC0C0', bg: 'transparent', keyColor: '#E8913A', border: '1px solid #232C39', onClick: () => this.openNote() }
|
||||
],
|
||||
openHelp: () => this.setState({ modal: { kind: 'help', title: 'Shortcuts', confirm: 'Close', key: 'esc', noCancel: true } }),
|
||||
helpRows: [{ k: '⌘F', d: 'Search the project' }, { k: '⌘L', d: 'Soft-wrap long lines (Fluid)' }, { k: '⌘.', d: 'Show hidden files' }, { k: '⌘N', d: 'Scratch note' }, { k: '⌘G', d: 'Open or close Git (full screen)' }, { k: '⌘1–3', d: 'Toggle Explorer, File, Claude' }, { k: 'Right-click', d: 'Pass on a file, folder or selection to Claude' }, { k: 'Shift+Tab', d: 'Cycle Claude mode (in the prompt)' }, { k: '⌘↵', d: 'Commit (in the Git message field)' }, { k: 'Esc', d: 'Close overlay or interrupt Claude' }],
|
||||
helpRows: [{ k: '⌘F', d: 'Search the project' }, { k: '⌘L', d: 'Soft-wrap long lines (Fluid)' }, { k: '⌘.', d: 'Show hidden files' }, { k: '⌘N', d: 'Scratch note' }, { k: '⌘G', d: 'Open or close Git (full screen)' }, { k: '⌘D', d: 'Open or close Schema (when the app has helder:schema)' }, { k: '⌘1–3', d: 'Toggle Explorer, File, Claude' }, { k: 'Right-click', d: 'Pass on a file, folder or selection to Claude' }, { k: 'Shift+Tab', d: 'Cycle Claude mode (in the prompt)' }, { k: '⌘↵', d: 'Commit (in the Git message field)' }, { k: 'Esc', d: 'Close overlay or interrupt Claude' }],
|
||||
showGit: P.git, showExplorer: P.explorer, showFile: P.file, showClaude: P.claude, allHidden: !P.explorer && !P.file && !P.claude,
|
||||
isClean: !changed.length, hasStaged: stagedP.length > 0, hasChanges: unstagedP.length > 0,
|
||||
stagedCount: stagedP.length, changeCount: unstagedP.length,
|
||||
|
||||
Reference in New Issue
Block a user