openmates 0.27.0-alpha.4 → 0.27.0-alpha.6
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/{chunk-LRCPOHGZ.js → chunk-WQOBJUWS.js} +281 -59
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -60941,6 +60941,41 @@ Only output the final Markdown table. Do NOT include explanations, notes, or any
|
|
|
60941
60941
|
}
|
|
60942
60942
|
},
|
|
60943
60943
|
chat: {
|
|
60944
|
+
draft_embed_labels: {
|
|
60945
|
+
image: {
|
|
60946
|
+
text: "Image"
|
|
60947
|
+
},
|
|
60948
|
+
audio: {
|
|
60949
|
+
text: "Audio"
|
|
60950
|
+
},
|
|
60951
|
+
recording: {
|
|
60952
|
+
text: "Recording"
|
|
60953
|
+
},
|
|
60954
|
+
website: {
|
|
60955
|
+
text: "Website"
|
|
60956
|
+
},
|
|
60957
|
+
video: {
|
|
60958
|
+
text: "Video"
|
|
60959
|
+
},
|
|
60960
|
+
location: {
|
|
60961
|
+
text: "Location"
|
|
60962
|
+
},
|
|
60963
|
+
pdf: {
|
|
60964
|
+
text: "PDF"
|
|
60965
|
+
},
|
|
60966
|
+
file: {
|
|
60967
|
+
text: "File"
|
|
60968
|
+
},
|
|
60969
|
+
book: {
|
|
60970
|
+
text: "Book"
|
|
60971
|
+
},
|
|
60972
|
+
code: {
|
|
60973
|
+
text: "Code"
|
|
60974
|
+
},
|
|
60975
|
+
embed: {
|
|
60976
|
+
text: "Embed"
|
|
60977
|
+
}
|
|
60978
|
+
},
|
|
60944
60979
|
generated_by_cost: {
|
|
60945
60980
|
text: "Cost: {credits} credits"
|
|
60946
60981
|
},
|
|
@@ -75786,6 +75821,155 @@ As of mid-2026, the severe supply shocks from the 2024\u20132025 avian flu have
|
|
|
75786
75821
|
}
|
|
75787
75822
|
}
|
|
75788
75823
|
},
|
|
75824
|
+
local_models: {
|
|
75825
|
+
title: {
|
|
75826
|
+
text: "Local models lab"
|
|
75827
|
+
},
|
|
75828
|
+
description: {
|
|
75829
|
+
text: "Optional on-device experiments. Download models once, then test without a network connection. No credits are charged."
|
|
75830
|
+
},
|
|
75831
|
+
toggle: {
|
|
75832
|
+
text: "Use local models in this lab"
|
|
75833
|
+
},
|
|
75834
|
+
scope: {
|
|
75835
|
+
text: "This switch enables only the tests below. Chat speech recognition, speech playback and personal-data protection keep their current providers and settings."
|
|
75836
|
+
},
|
|
75837
|
+
download: {
|
|
75838
|
+
text: "Download"
|
|
75839
|
+
},
|
|
75840
|
+
not_downloaded: {
|
|
75841
|
+
text: "Not downloaded"
|
|
75842
|
+
},
|
|
75843
|
+
ready: {
|
|
75844
|
+
text: "Ready for offline tests"
|
|
75845
|
+
},
|
|
75846
|
+
downloading: {
|
|
75847
|
+
text: "Downloading {percent}%"
|
|
75848
|
+
},
|
|
75849
|
+
download_failed: {
|
|
75850
|
+
text: "Download failed. Retry when your connection and free storage are available."
|
|
75851
|
+
},
|
|
75852
|
+
run: {
|
|
75853
|
+
text: "Run local test"
|
|
75854
|
+
},
|
|
75855
|
+
import_audio: {
|
|
75856
|
+
text: "Import audio file"
|
|
75857
|
+
},
|
|
75858
|
+
record: {
|
|
75859
|
+
text: "Record microphone"
|
|
75860
|
+
},
|
|
75861
|
+
stop_recording: {
|
|
75862
|
+
text: "Stop recording"
|
|
75863
|
+
},
|
|
75864
|
+
audio_ready: {
|
|
75865
|
+
text: "Audio ready: {seconds} seconds"
|
|
75866
|
+
},
|
|
75867
|
+
speech_input: {
|
|
75868
|
+
text: "English text to speak"
|
|
75869
|
+
},
|
|
75870
|
+
privacy_input: {
|
|
75871
|
+
text: "Text to inspect for personal data"
|
|
75872
|
+
},
|
|
75873
|
+
input_placeholder: {
|
|
75874
|
+
text: "Enter disposable test text"
|
|
75875
|
+
},
|
|
75876
|
+
play: {
|
|
75877
|
+
text: "Play generated speech"
|
|
75878
|
+
},
|
|
75879
|
+
stop_playback: {
|
|
75880
|
+
text: "Stop playback"
|
|
75881
|
+
},
|
|
75882
|
+
running: {
|
|
75883
|
+
text: "Running locally\u2026"
|
|
75884
|
+
},
|
|
75885
|
+
cancelling: {
|
|
75886
|
+
text: "Cancelling and unloading\u2026"
|
|
75887
|
+
},
|
|
75888
|
+
elapsed: {
|
|
75889
|
+
text: "Elapsed time"
|
|
75890
|
+
},
|
|
75891
|
+
rtf: {
|
|
75892
|
+
text: "Real-time factor"
|
|
75893
|
+
},
|
|
75894
|
+
environment: {
|
|
75895
|
+
text: "{cores} CPU cores \xB7 {memory} device memory \xB7 thermal state: {thermal}"
|
|
75896
|
+
},
|
|
75897
|
+
thermal_nominal: {
|
|
75898
|
+
text: "normal"
|
|
75899
|
+
},
|
|
75900
|
+
thermal_fair: {
|
|
75901
|
+
text: "warm"
|
|
75902
|
+
},
|
|
75903
|
+
thermal_serious: {
|
|
75904
|
+
text: "hot"
|
|
75905
|
+
},
|
|
75906
|
+
thermal_critical: {
|
|
75907
|
+
text: "critical"
|
|
75908
|
+
},
|
|
75909
|
+
unavailable: {
|
|
75910
|
+
text: "Unavailable"
|
|
75911
|
+
},
|
|
75912
|
+
result: {
|
|
75913
|
+
text: "Local test result"
|
|
75914
|
+
},
|
|
75915
|
+
no_entities: {
|
|
75916
|
+
text: "No entities detected. This experimental result does not prove the text is safe."
|
|
75917
|
+
},
|
|
75918
|
+
audio_error: {
|
|
75919
|
+
text: "The audio file could not be read, recorded or played. Choose a supported audio file and try again."
|
|
75920
|
+
},
|
|
75921
|
+
microphone_error: {
|
|
75922
|
+
text: "Microphone access is required to record a test. You can also import an audio file."
|
|
75923
|
+
},
|
|
75924
|
+
run_error: {
|
|
75925
|
+
text: "The local test failed. Check that the model download is complete and this device supports its runtime. No cloud fallback was used."
|
|
75926
|
+
},
|
|
75927
|
+
privacy_note: {
|
|
75928
|
+
text: "Inputs, recordings and generated output are temporary and cleared when you leave this page. Installed models remain until removed. Run one model at a time; cancellation waits for the active native operation to finish."
|
|
75929
|
+
},
|
|
75930
|
+
whisper: {
|
|
75931
|
+
text: "WhisperKit large-v3 turbo \xB7 speech to text"
|
|
75932
|
+
},
|
|
75933
|
+
kokoro: {
|
|
75934
|
+
text: "Kokoro \xB7 English text to speech"
|
|
75935
|
+
},
|
|
75936
|
+
privacy_filter: {
|
|
75937
|
+
text: "OpenAI Privacy Filter \xB7 personal data"
|
|
75938
|
+
},
|
|
75939
|
+
entity: {
|
|
75940
|
+
text: "{label} \xB7 {start}\u2013{end} \xB7 confidence {score}"
|
|
75941
|
+
},
|
|
75942
|
+
installed_size: {
|
|
75943
|
+
text: "Download size"
|
|
75944
|
+
},
|
|
75945
|
+
revision: {
|
|
75946
|
+
text: "Revision"
|
|
75947
|
+
},
|
|
75948
|
+
waveform: {
|
|
75949
|
+
text: "Generated audio waveform"
|
|
75950
|
+
},
|
|
75951
|
+
cancelled: {
|
|
75952
|
+
text: "Download cancelled"
|
|
75953
|
+
},
|
|
75954
|
+
not_enough_space: {
|
|
75955
|
+
text: "Not enough free storage for this model"
|
|
75956
|
+
},
|
|
75957
|
+
kokoro_os_error: {
|
|
75958
|
+
text: "Kokoro is currently unavailable on iOS and macOS 27 or later because its upstream runtime can crash. Try another model or an earlier supported OS."
|
|
75959
|
+
},
|
|
75960
|
+
peak_memory: {
|
|
75961
|
+
text: "App peak resident memory"
|
|
75962
|
+
},
|
|
75963
|
+
verifying: {
|
|
75964
|
+
text: "Verifying installed files locally\u2026"
|
|
75965
|
+
},
|
|
75966
|
+
kokoro_input_limits: {
|
|
75967
|
+
text: "Use short, simple English text. Spell out decimals, currency amounts and times in words. Unsupported formats and foreign characters are rejected. This lab does not include the full upstream text normalization pipeline."
|
|
75968
|
+
},
|
|
75969
|
+
architecture_unavailable: {
|
|
75970
|
+
text: "These local models require an iPhone, iPad or Apple silicon Mac. Intel Macs and Apple Watch are unsupported; downloads and tests are disabled."
|
|
75971
|
+
}
|
|
75972
|
+
},
|
|
75789
75973
|
open_settings_menu: {
|
|
75790
75974
|
text: "Open settings menu"
|
|
75791
75975
|
},
|
|
@@ -84362,6 +84546,21 @@ function padCells(value, width) {
|
|
|
84362
84546
|
const trimmed = truncateCells(value, width);
|
|
84363
84547
|
return trimmed + " ".repeat(Math.max(0, width - cells(trimmed)));
|
|
84364
84548
|
}
|
|
84549
|
+
function sliceCells(value, start, width) {
|
|
84550
|
+
start = Math.max(0, Math.floor(start));
|
|
84551
|
+
width = Math.max(0, Math.floor(width));
|
|
84552
|
+
const end = start + width;
|
|
84553
|
+
let position = 0, result = "";
|
|
84554
|
+
for (const { segment } of segments.segment(terminalText(value).replace(/\n/g, " "))) {
|
|
84555
|
+
const size = graphemeWidth(segment), next = position + size;
|
|
84556
|
+
if (next > start && position < end) {
|
|
84557
|
+
result += position >= start && next <= end ? segment : " ".repeat(Math.min(end, next) - Math.max(start, position));
|
|
84558
|
+
}
|
|
84559
|
+
position = next;
|
|
84560
|
+
if (position >= end) break;
|
|
84561
|
+
}
|
|
84562
|
+
return result + " ".repeat(Math.max(0, width - cells(result)));
|
|
84563
|
+
}
|
|
84365
84564
|
function wrapCells(value, width) {
|
|
84366
84565
|
width = Math.max(1, width);
|
|
84367
84566
|
const result = [];
|
|
@@ -85388,7 +85587,7 @@ function workspaceHint(state) {
|
|
|
85388
85587
|
if (state.screen === "app") return "1\u20135 tabs \u2191/\u2193 choose Enter open Esc Apps /search";
|
|
85389
85588
|
if (state.screen === "app-skill") return "1\u20133 tabs Enter use skill Esc app Ctrl+P actions";
|
|
85390
85589
|
if (state.screen === "app-result") return "\u2191/\u2193 scroll Esc saved results Ctrl+P actions";
|
|
85391
|
-
if (state.screen === "apps") return "\
|
|
85590
|
+
if (state.screen === "apps") return state.focus === "composer" ? "Type /command Shift+Tab apps Ctrl+B sidebar" : "\u2190/\u2192 app Enter open \u2191/\u2193 scroll /search /browse Show all Ctrl+B sidebar";
|
|
85392
85591
|
if (state.screen === "projects" || state.screen === "tasks" || state.screen === "workflows") return "\u2191/\u2193 choose Enter open /search filter Tab focus Ctrl+P actions";
|
|
85393
85592
|
if (state.screen === "interests") return "\u2191/\u2193 move Space select Enter continue Esc back";
|
|
85394
85593
|
if (state.screen === "examples") return "\u2191/\u2193 choose Enter open /search filter Esc back";
|
|
@@ -85453,7 +85652,7 @@ function renderWorkspaceFrame(state, rawWidth, rawHeight, body, options = {}) {
|
|
|
85453
85652
|
const markers = content.map((row, index) => /(?:^|[│|])\s*[>›] /.test(lineText(row)) ? index : -1).filter((index) => index >= 0);
|
|
85454
85653
|
const marker = state.screen === "workflow" ? markers.at(-1) ?? -1 : markers[0] ?? -1;
|
|
85455
85654
|
let selectionEnd = marker;
|
|
85456
|
-
if (["workflow", "start", "chats"].includes(state.screen) && marker >= 0) {
|
|
85655
|
+
if (["workflow", "start", "chats", "apps"].includes(state.screen) && marker >= 0) {
|
|
85457
85656
|
const closing = content.findIndex((row, index) => index > marker && lineText(row).includes("\u2570"));
|
|
85458
85657
|
selectionEnd = Math.min(marker + 10, closing < 0 ? marker : closing);
|
|
85459
85658
|
}
|
|
@@ -85506,6 +85705,48 @@ function titleCase(value) {
|
|
|
85506
85705
|
return value.charAt(0).toUpperCase() + value.slice(1);
|
|
85507
85706
|
}
|
|
85508
85707
|
|
|
85708
|
+
// src/tuiCarousel.ts
|
|
85709
|
+
function renderCardCarousel(cards, width, selectedIndex, focused) {
|
|
85710
|
+
width = Math.max(1, Math.floor(width));
|
|
85711
|
+
if (!cards.length) return [];
|
|
85712
|
+
const selected = Math.max(0, Math.min(cards.length - 1, selectedIndex));
|
|
85713
|
+
const cardWidth = Math.min(width, 36), inner = Math.max(1, cardWidth - 4), stride = cardWidth + 2;
|
|
85714
|
+
const center = Math.floor((width - cardWidth) / 2);
|
|
85715
|
+
const reach = Math.ceil(width / stride);
|
|
85716
|
+
const visible = cards.slice(Math.max(0, selected - reach), selected + reach + 1).map((card, offset) => {
|
|
85717
|
+
const index = Math.max(0, selected - reach) + offset, active = index === selected && focused;
|
|
85718
|
+
const title = wrapCells(`${active ? "\u203A " : ""}${card.title}`, inner).slice(0, 2);
|
|
85719
|
+
const description = wrapCells(card.description, inner).slice(0, 2);
|
|
85720
|
+
while (title.length < 2) title.push("");
|
|
85721
|
+
while (description.length < 2) description.push("");
|
|
85722
|
+
const rows2 = cardWidth < 4 ? [truncateCells(card.title, cardWidth)] : [
|
|
85723
|
+
`\u256D${"\u2500".repeat(cardWidth - 2)}\u256E`,
|
|
85724
|
+
...title.map((line) => `\u2502 ${padCells(line, inner)} \u2502`),
|
|
85725
|
+
...description.map((line) => `\u2502 ${padCells(line, inner)} \u2502`),
|
|
85726
|
+
`\u2502 ${padCells(card.footer, inner)} \u2502`,
|
|
85727
|
+
`\u2570${"\u2500".repeat(cardWidth - 2)}\u256F`
|
|
85728
|
+
];
|
|
85729
|
+
return { rows: rows2, left: center + (index - selected) * stride, background: card.background, active };
|
|
85730
|
+
});
|
|
85731
|
+
return Array.from({ length: visible[0].rows.length }, (_, row) => {
|
|
85732
|
+
const spans = [];
|
|
85733
|
+
let column = 0;
|
|
85734
|
+
for (const card of visible) {
|
|
85735
|
+
const start = Math.max(0, card.left), end = Math.min(width, card.left + cardWidth);
|
|
85736
|
+
if (end <= start) continue;
|
|
85737
|
+
if (start > column) spans.push({ text: " ".repeat(start - column) });
|
|
85738
|
+
spans.push({ text: sliceCells(card.rows[row], Math.max(0, -card.left), end - start), background: card.background, bold: card.active });
|
|
85739
|
+
column = end;
|
|
85740
|
+
}
|
|
85741
|
+
if (column < width) spans.push({ text: " ".repeat(width - column) });
|
|
85742
|
+
return { text: spans.map((span) => span.text).join(""), spans };
|
|
85743
|
+
});
|
|
85744
|
+
}
|
|
85745
|
+
function centeredCarouselText(text4, width) {
|
|
85746
|
+
const value = truncateCells(text4, width);
|
|
85747
|
+
return " ".repeat(Math.max(0, Math.floor((width - cells(value)) / 2))) + value;
|
|
85748
|
+
}
|
|
85749
|
+
|
|
85509
85750
|
// ../workspaceInspirationDefaults.ts
|
|
85510
85751
|
function getWorkspaceInspirations(surface) {
|
|
85511
85752
|
const now = Math.floor(Date.now() / 1e3);
|
|
@@ -85766,10 +86007,7 @@ async function loadHomeData(state, client2, render) {
|
|
|
85766
86007
|
render();
|
|
85767
86008
|
}
|
|
85768
86009
|
}
|
|
85769
|
-
|
|
85770
|
-
const value = truncateCells(text4, width);
|
|
85771
|
-
return " ".repeat(Math.max(0, Math.floor((width - cells(value)) / 2))) + value;
|
|
85772
|
-
}
|
|
86010
|
+
var centered2 = centeredCarouselText;
|
|
85773
86011
|
function homeHeader(state, width, height) {
|
|
85774
86012
|
const inspiration = currentInspiration(state), rows2 = Math.max(4, Math.min(8, Math.floor(height / 5))), result = [];
|
|
85775
86013
|
const gradient = inspiration?.category && CATEGORY_GRADIENTS[inspiration.category] || CATEGORY_GRADIENTS.general_knowledge;
|
|
@@ -85793,40 +86031,12 @@ function renderHomeChatCards(state, width, height) {
|
|
|
85793
86031
|
}
|
|
85794
86032
|
result.push(centered2(state.signedIn ? "Continue where you left off" : "Explore example chats", width), "");
|
|
85795
86033
|
const selected = Math.max(0, Math.min(chats.length - 1, state.selectedIndex));
|
|
85796
|
-
|
|
85797
|
-
|
|
85798
|
-
|
|
85799
|
-
|
|
85800
|
-
|
|
85801
|
-
|
|
85802
|
-
const summary = wrapCells(chat.summary || "Continue this conversation", inner).slice(0, 2);
|
|
85803
|
-
while (title.length < 2) title.push("");
|
|
85804
|
-
while (summary.length < 2) summary.push("");
|
|
85805
|
-
const rows2 = cardWidth < 4 ? [truncateCells(chat.title || "Untitled chat", cardWidth)] : [
|
|
85806
|
-
`\u256D${"\u2500".repeat(cardWidth - 2)}\u256E`,
|
|
85807
|
-
...title.map((line) => `\u2502 ${padCells(line, inner)} \u2502`),
|
|
85808
|
-
...summary.map((line) => `\u2502 ${padCells(line, inner)} \u2502`),
|
|
85809
|
-
`\u2502 ${padCells(chat.category?.replaceAll("_", " ") || "Chat", inner)} \u2502`,
|
|
85810
|
-
`\u2570${"\u2500".repeat(cardWidth - 2)}\u256F`
|
|
85811
|
-
];
|
|
85812
|
-
return { rows: rows2, background: (chat.category && CATEGORY_GRADIENTS[chat.category] || BLUE).start, active };
|
|
85813
|
-
});
|
|
85814
|
-
for (let row = 0; row < cards[0].rows.length; row++) {
|
|
85815
|
-
const spans = [];
|
|
85816
|
-
let remaining = width;
|
|
85817
|
-
for (const card of cards) {
|
|
85818
|
-
if (!remaining) break;
|
|
85819
|
-
const text4 = truncateCells(card.rows[row], remaining);
|
|
85820
|
-
spans.push({ text: text4, background: card.background, bold: card.active });
|
|
85821
|
-
remaining -= cells(text4);
|
|
85822
|
-
if (remaining) {
|
|
85823
|
-
const gap = " ".repeat(Math.min(2, remaining));
|
|
85824
|
-
spans.push({ text: gap });
|
|
85825
|
-
remaining -= gap.length;
|
|
85826
|
-
}
|
|
85827
|
-
}
|
|
85828
|
-
result.push({ text: spans.map((span) => span.text).join(""), spans });
|
|
85829
|
-
}
|
|
86034
|
+
result.push(...renderCardCarousel(chats.map((chat) => ({
|
|
86035
|
+
title: chat.title || "Untitled chat",
|
|
86036
|
+
description: chat.summary || "Continue this conversation",
|
|
86037
|
+
footer: chat.category?.replaceAll("_", " ") || "Chat",
|
|
86038
|
+
background: (chat.category && CATEGORY_GRADIENTS[chat.category] || BLUE).start
|
|
86039
|
+
})), width, selected, state.focus === "content"));
|
|
85830
86040
|
result.push(
|
|
85831
86041
|
"",
|
|
85832
86042
|
centered2(`${selected > 0 ? "\u2039" : " "} Chat ${selected + 1} of ${chats.length} ${selected < chats.length - 1 ? "\u203A" : " "}`, width),
|
|
@@ -86044,20 +86254,26 @@ function visibleTuiApps(apps, query = "") {
|
|
|
86044
86254
|
const words = query.toLocaleLowerCase().trim().split(/\s+/).filter(Boolean);
|
|
86045
86255
|
return apps.filter((app) => words.every((word) => `${app.name} ${app.description} ${app.category} ${app.skills.map((skill) => skill.name).join(" ")}`.toLocaleLowerCase().includes(word)));
|
|
86046
86256
|
}
|
|
86257
|
+
function homeTuiApps(apps, query = "", showAll = false) {
|
|
86258
|
+
const visible = visibleTuiApps(apps, query);
|
|
86259
|
+
return showAll || query ? visible : visible.slice(0, HOME_APP_ORDER.length);
|
|
86260
|
+
}
|
|
86047
86261
|
function renderTuiAppsHome(apps, options) {
|
|
86048
86262
|
const width = Math.max(1, options.width);
|
|
86049
86263
|
const visible = visibleTuiApps(apps, options.query);
|
|
86050
|
-
|
|
86051
|
-
|
|
86052
|
-
|
|
86053
|
-
|
|
86054
|
-
|
|
86055
|
-
app.description,
|
|
86056
|
-
`${app.skills.length} skills${app.category ? ` \xB7 ${app.category.replaceAll("_", " ")}` : ""}`,
|
|
86057
|
-
|
|
86058
|
-
),
|
|
86059
|
-
|
|
86060
|
-
|
|
86264
|
+
if (!visible.length) return [centeredCarouselText(options.query ? "No matching apps." : "No apps available.", width)];
|
|
86265
|
+
const selected = Math.max(0, Math.min(visible.length - 1, options.selectedIndex ?? visible.findIndex((app) => app.id === options.selectedId)));
|
|
86266
|
+
return [
|
|
86267
|
+
...renderCardCarousel(visible.map((app) => ({
|
|
86268
|
+
title: app.name,
|
|
86269
|
+
description: app.description,
|
|
86270
|
+
footer: `${app.skills.length} skills${app.category ? ` \xB7 ${app.category.replaceAll("_", " ")}` : ""}`,
|
|
86271
|
+
background: (APP_GRADIENTS[app.id] ?? PRIMARY_GRADIENT).start
|
|
86272
|
+
})), width, selected, options.selectedId !== void 0),
|
|
86273
|
+
"",
|
|
86274
|
+
centeredCarouselText(`${selected > 0 ? "\u2039" : " "} App ${selected + 1} of ${visible.length} ${selected < visible.length - 1 ? "\u203A" : " "}`, width),
|
|
86275
|
+
centeredCarouselText("\u2190/\u2192 choose app \xB7 Enter open \xB7 Tab focus", width)
|
|
86276
|
+
];
|
|
86061
86277
|
}
|
|
86062
86278
|
function cardLines(title, description, footer, width) {
|
|
86063
86279
|
if (width < 4) return [truncateCells(title, width)];
|
|
@@ -86704,8 +86920,13 @@ function renderBody(state, width, height) {
|
|
|
86704
86920
|
case "chats":
|
|
86705
86921
|
return renderHomeChatCards(state, width, height);
|
|
86706
86922
|
case "apps": {
|
|
86707
|
-
const apps =
|
|
86708
|
-
return [
|
|
86923
|
+
const apps = homeTuiApps(state.apps, state.filter, state.homeShowAll);
|
|
86924
|
+
return [
|
|
86925
|
+
...homeHeader(state, width, height),
|
|
86926
|
+
...renderTuiAppsHome(apps, { width, selectedIndex: state.selectedIndex, selectedId: state.focus === "content" ? apps[state.selectedIndex]?.id : void 0 }),
|
|
86927
|
+
"",
|
|
86928
|
+
centeredCarouselText(`${state.homeShowAll ? "/browse Featured apps" : "/browse Show all"} \xB7 /search Search apps`, width)
|
|
86929
|
+
];
|
|
86709
86930
|
}
|
|
86710
86931
|
case "app": {
|
|
86711
86932
|
const app = state.activeApp;
|
|
@@ -87566,8 +87787,8 @@ async function handleWorkspaceKey(context, chunk, key) {
|
|
|
87566
87787
|
return true;
|
|
87567
87788
|
}
|
|
87568
87789
|
if (state.workflowEdit) return false;
|
|
87569
|
-
const chatHome = state.screen === "start" || state.screen === "chats";
|
|
87570
|
-
if (["pageup", "pagedown", "home", "end", "scrollup", "scrolldown"].includes(key.name ?? "") || (
|
|
87790
|
+
const chatHome = state.screen === "start" || state.screen === "chats", carouselHome = chatHome || state.screen === "apps";
|
|
87791
|
+
if (["pageup", "pagedown", "home", "end", "scrollup", "scrolldown"].includes(key.name ?? "") || (carouselHome || state.screen === "project" && state.projectTab === "overview") && ["up", "down"].includes(key.name ?? "") && ["composer", "content"].includes(state.focus) && !state.input.startsWith("/")) {
|
|
87571
87792
|
const bottom = state.screen === "chat";
|
|
87572
87793
|
state.followSelection = false;
|
|
87573
87794
|
if (key.name === "home") state.scrollOffset = bottom ? 1e4 : 0;
|
|
@@ -87640,8 +87861,9 @@ async function handleWorkspaceKey(context, chunk, key) {
|
|
|
87640
87861
|
render();
|
|
87641
87862
|
return true;
|
|
87642
87863
|
}
|
|
87643
|
-
if (
|
|
87644
|
-
|
|
87864
|
+
if (carouselHome && state.focus === "content" && (key.name === "left" || key.name === "right")) {
|
|
87865
|
+
const count = chatHome ? homeChatItems(state).length : homeTuiApps(state.apps, state.filter, state.homeShowAll).length;
|
|
87866
|
+
state.selectedIndex = Math.max(0, Math.min(Math.max(0, count - 1), state.selectedIndex + (key.name === "left" ? -1 : 1)));
|
|
87645
87867
|
state.followSelection = true;
|
|
87646
87868
|
render();
|
|
87647
87869
|
return true;
|
|
@@ -87696,7 +87918,7 @@ async function handleWorkspaceKey(context, chunk, key) {
|
|
|
87696
87918
|
}
|
|
87697
87919
|
const resultsTab = state.screen === "app" ? state.appTab === "embeds" : state.screen === "app-skill" && state.appSkillTab === "embeds";
|
|
87698
87920
|
const workflowsTab = state.screen === "app" ? state.appTab === "workflows" : state.screen === "app-skill" && state.appSkillTab === "workflows";
|
|
87699
|
-
const count = state.screen === "apps" ?
|
|
87921
|
+
const count = state.screen === "apps" ? homeTuiApps(state.apps, state.filter, state.homeShowAll).length : resultsTab ? state.appResults.items.length : workflowsTab ? state.appWorkflows.items.length : state.activeApp?.skills.length ?? 0;
|
|
87700
87922
|
if (key.name === "up" || key.name === "down") {
|
|
87701
87923
|
state.selectedIndex = Math.max(0, Math.min(count - 1, state.selectedIndex + (key.name === "up" ? -1 : 1)));
|
|
87702
87924
|
render();
|
|
@@ -87704,7 +87926,7 @@ async function handleWorkspaceKey(context, chunk, key) {
|
|
|
87704
87926
|
}
|
|
87705
87927
|
if (key.name === "return") {
|
|
87706
87928
|
if (state.screen === "apps") {
|
|
87707
|
-
const app =
|
|
87929
|
+
const app = homeTuiApps(state.apps, state.filter, state.homeShowAll)[state.selectedIndex];
|
|
87708
87930
|
if (app) await context.command(`/app ${app.id}`);
|
|
87709
87931
|
} else if (resultsTab) {
|
|
87710
87932
|
const result = state.appResults.items[state.selectedIndex];
|
package/dist/cli.js
CHANGED
package/dist/index.js
CHANGED