@sma1lboy/kobe 0.5.6 → 0.5.7
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/dist/cli/index.js +52 -45
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -4652,7 +4652,7 @@ var init_git = __esm(() => {
|
|
|
4652
4652
|
};
|
|
4653
4653
|
});
|
|
4654
4654
|
|
|
4655
|
-
// src/tui/lib/keymap.
|
|
4655
|
+
// src/tui/lib/keymap-dispatch.ts
|
|
4656
4656
|
function matchKey(evt) {
|
|
4657
4657
|
const base = [];
|
|
4658
4658
|
const name = evt.name;
|
|
@@ -4676,6 +4676,28 @@ function matchKey(evt) {
|
|
|
4676
4676
|
const prefix = `${mods.join("+")}+`;
|
|
4677
4677
|
return base.map((n) => prefix + n);
|
|
4678
4678
|
}
|
|
4679
|
+
function dispatchKeyEvent(bindingStack, evt) {
|
|
4680
|
+
if (evt.defaultPrevented)
|
|
4681
|
+
return false;
|
|
4682
|
+
const candidates = matchKey(evt);
|
|
4683
|
+
for (let i = bindingStack.length - 1;i >= 0; i--) {
|
|
4684
|
+
const reg = bindingStack[i];
|
|
4685
|
+
if (!reg)
|
|
4686
|
+
continue;
|
|
4687
|
+
const cfg = reg.config();
|
|
4688
|
+
if (cfg.enabled === false)
|
|
4689
|
+
continue;
|
|
4690
|
+
const hit = cfg.bindings.find((b) => candidates.includes(b.key));
|
|
4691
|
+
if (hit) {
|
|
4692
|
+
hit.cmd(evt);
|
|
4693
|
+
evt.preventDefault();
|
|
4694
|
+
return true;
|
|
4695
|
+
}
|
|
4696
|
+
}
|
|
4697
|
+
return false;
|
|
4698
|
+
}
|
|
4699
|
+
|
|
4700
|
+
// src/tui/lib/keymap.tsx
|
|
4679
4701
|
function ensureInstalled() {
|
|
4680
4702
|
if (installed)
|
|
4681
4703
|
return;
|
|
@@ -4685,22 +4707,7 @@ function ensureInstalled() {
|
|
|
4685
4707
|
}
|
|
4686
4708
|
installed = renderer.keyInput;
|
|
4687
4709
|
listener = (evt) => {
|
|
4688
|
-
|
|
4689
|
-
return;
|
|
4690
|
-
const candidates = matchKey(evt);
|
|
4691
|
-
for (let i = stack.length - 1;i >= 0; i--) {
|
|
4692
|
-
const reg = stack[i];
|
|
4693
|
-
if (!reg)
|
|
4694
|
-
continue;
|
|
4695
|
-
const cfg = reg.config();
|
|
4696
|
-
if (cfg.enabled === false)
|
|
4697
|
-
continue;
|
|
4698
|
-
const hit = cfg.bindings.find((b) => candidates.includes(b.key));
|
|
4699
|
-
if (hit) {
|
|
4700
|
-
hit.cmd(evt);
|
|
4701
|
-
return;
|
|
4702
|
-
}
|
|
4703
|
-
}
|
|
4710
|
+
dispatchKeyEvent(stack, evt);
|
|
4704
4711
|
};
|
|
4705
4712
|
installed.on("keypress", listener);
|
|
4706
4713
|
}
|
|
@@ -8871,7 +8878,7 @@ var init_package = __esm(() => {
|
|
|
8871
8878
|
package_default = {
|
|
8872
8879
|
$schema: "https://json.schemastore.org/package.json",
|
|
8873
8880
|
name: "@sma1lboy/kobe",
|
|
8874
|
-
version: "0.5.
|
|
8881
|
+
version: "0.5.7",
|
|
8875
8882
|
description: "TUI orchestrator for Claude Code (codename)",
|
|
8876
8883
|
type: "module",
|
|
8877
8884
|
packageManager: "bun@1.3.13",
|
|
@@ -21512,8 +21519,6 @@ var init_store2 = __esm(() => {
|
|
|
21512
21519
|
// src/tui/panes/chat/use-chat-session.ts
|
|
21513
21520
|
function useChatSession(opts) {
|
|
21514
21521
|
const { orchestrator, onTaskReset } = opts;
|
|
21515
|
-
const [statesByTab, setStatesByTab] = createSignal(new Map);
|
|
21516
|
-
const [draftsByTab, setDraftsByTab] = createSignal(new Map);
|
|
21517
21522
|
const [activeTabId, setActiveTabIdLocal] = createSignal(null);
|
|
21518
21523
|
let tabSubs = new Map;
|
|
21519
21524
|
let currentSubsTaskId = null;
|
|
@@ -21593,9 +21598,7 @@ function useChatSession(opts) {
|
|
|
21593
21598
|
tabSubs.set(tabId, unsub);
|
|
21594
21599
|
const tabKey2 = chatRunStateKey(taskId, tabId);
|
|
21595
21600
|
const runState = orchestrator.chatRunStateSignal()().get(tabKey2);
|
|
21596
|
-
|
|
21597
|
-
patchStateForTab(tabId, (s) => ({ ...s, isStreaming: true }));
|
|
21598
|
-
}
|
|
21601
|
+
patchStateForTab(tabId, (s) => ({ ...s, isStreaming: runState === "running" }));
|
|
21599
21602
|
const replayPending = () => {
|
|
21600
21603
|
if (opts.taskId() !== taskId)
|
|
21601
21604
|
return;
|
|
@@ -21648,8 +21651,6 @@ function useChatSession(opts) {
|
|
|
21648
21651
|
if (!id) {
|
|
21649
21652
|
if (currentSubsTaskId !== null) {
|
|
21650
21653
|
teardownAllSubs();
|
|
21651
|
-
setStatesByTab(new Map);
|
|
21652
|
-
setDraftsByTab(new Map);
|
|
21653
21654
|
onTaskReset?.();
|
|
21654
21655
|
}
|
|
21655
21656
|
setActiveTabIdLocal(null);
|
|
@@ -21662,8 +21663,6 @@ function useChatSession(opts) {
|
|
|
21662
21663
|
}
|
|
21663
21664
|
if (currentSubsTaskId !== id) {
|
|
21664
21665
|
teardownAllSubs();
|
|
21665
|
-
setStatesByTab(new Map);
|
|
21666
|
-
setDraftsByTab(new Map);
|
|
21667
21666
|
currentSubsTaskId = id;
|
|
21668
21667
|
setActiveTabIdLocal(live.activeTabId);
|
|
21669
21668
|
onTaskReset?.();
|
|
@@ -21677,8 +21676,6 @@ function useChatSession(opts) {
|
|
|
21677
21676
|
});
|
|
21678
21677
|
onCleanup(() => {
|
|
21679
21678
|
teardownAllSubs();
|
|
21680
|
-
setStatesByTab(new Map);
|
|
21681
|
-
setDraftsByTab(new Map);
|
|
21682
21679
|
});
|
|
21683
21680
|
return {
|
|
21684
21681
|
activeTabId,
|
|
@@ -21694,10 +21691,13 @@ function useChatSession(opts) {
|
|
|
21694
21691
|
setDraft
|
|
21695
21692
|
};
|
|
21696
21693
|
}
|
|
21694
|
+
var draftsByTab, setDraftsByTab, statesByTab, setStatesByTab;
|
|
21697
21695
|
var init_use_chat_session = __esm(() => {
|
|
21698
21696
|
init_dev();
|
|
21699
21697
|
init_core();
|
|
21700
21698
|
init_store2();
|
|
21699
|
+
[draftsByTab, setDraftsByTab] = createSignal(new Map);
|
|
21700
|
+
[statesByTab, setStatesByTab] = createSignal(new Map);
|
|
21701
21701
|
});
|
|
21702
21702
|
|
|
21703
21703
|
// src/tui/panes/chat/Chat.tsx
|
|
@@ -21757,7 +21757,7 @@ function Chat(props) {
|
|
|
21757
21757
|
});
|
|
21758
21758
|
const activeTabId = session.activeTabId;
|
|
21759
21759
|
const setActiveTabIdLocal = session.setActiveTabIdLocal;
|
|
21760
|
-
const
|
|
21760
|
+
const statesByTab2 = session.statesByTab;
|
|
21761
21761
|
const tabs = session.tabs;
|
|
21762
21762
|
const activeState = session.activeState;
|
|
21763
21763
|
const draft = session.draft;
|
|
@@ -21772,7 +21772,7 @@ function Chat(props) {
|
|
|
21772
21772
|
const tabId = activeTabId();
|
|
21773
21773
|
if (!tid || !tabId)
|
|
21774
21774
|
return null;
|
|
21775
|
-
const st =
|
|
21775
|
+
const st = statesByTab2().get(tabId);
|
|
21776
21776
|
const u = st?.lastUsage;
|
|
21777
21777
|
if (!u)
|
|
21778
21778
|
return null;
|
|
@@ -23465,20 +23465,27 @@ function Shell(props) {
|
|
|
23465
23465
|
return focusedPane() === "workspace";
|
|
23466
23466
|
}
|
|
23467
23467
|
}), _el$5);
|
|
23468
|
-
insert(_el$4, createComponent2(
|
|
23469
|
-
|
|
23470
|
-
|
|
23471
|
-
|
|
23472
|
-
|
|
23473
|
-
|
|
23474
|
-
|
|
23475
|
-
|
|
23476
|
-
|
|
23477
|
-
|
|
23478
|
-
|
|
23479
|
-
|
|
23480
|
-
|
|
23481
|
-
|
|
23468
|
+
insert(_el$4, createComponent2(Show, {
|
|
23469
|
+
get when() {
|
|
23470
|
+
return selectedId();
|
|
23471
|
+
},
|
|
23472
|
+
get children() {
|
|
23473
|
+
return createComponent2(CenterTabStrip, {
|
|
23474
|
+
isChatActive: isChatTabActive,
|
|
23475
|
+
activeFile: activeFileTabPath,
|
|
23476
|
+
chatTabs: activeChatTabsAcc,
|
|
23477
|
+
activeChatTabId: activeChatTabIdAcc,
|
|
23478
|
+
activeTaskId: taskIdAcc,
|
|
23479
|
+
chatRunState: chatRunStateAcc,
|
|
23480
|
+
get unread() {
|
|
23481
|
+
return notifications.unread;
|
|
23482
|
+
},
|
|
23483
|
+
onSelectChat: selectChatTab,
|
|
23484
|
+
onSelectChatTab: selectChatTabById,
|
|
23485
|
+
onSelectFile: selectFileTab,
|
|
23486
|
+
onCloseFile: closeFileTab
|
|
23487
|
+
});
|
|
23488
|
+
}
|
|
23482
23489
|
}), _el$5);
|
|
23483
23490
|
setProp(_el$5, "flexGrow", 1);
|
|
23484
23491
|
insert(_el$5, createComponent2(Show, {
|
package/package.json
CHANGED