@aurora-foundation/obsidian-next 0.4.10 → 0.4.11
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/CHANGELOG.md +11 -0
- package/dist/index.js +31 -5
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.4.11] - 2026-02-14
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- **Chat Layout**: Messages no longer stick to the bottom of the terminal when few or no messages are present. Layout dynamically switches between top-aligned (few messages) and bottom-anchored (full viewport).
|
|
12
|
+
- **Scroll Support**: Arrow keys (Up/Down) now scroll through chat history one line at a time. Shift+Arrow jumps a full page. Scroll position is preserved when new messages arrive if the user has scrolled up.
|
|
13
|
+
- **Scroll Indicator**: Yellow indicator shows current scroll position and keybind hints when scrolled up.
|
|
14
|
+
- **Scroll Reset**: Sending a message or running `/clear` automatically jumps back to the bottom of the conversation.
|
|
15
|
+
- **MessageList Boundary Guard**: Prevents crash when events are cleared while scrolled up (negative index guard).
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
8
19
|
## [0.4.8] - 2026-02-13
|
|
9
20
|
|
|
10
21
|
### Added
|
package/dist/index.js
CHANGED
|
@@ -951,7 +951,7 @@ var MessageListComponent = ({
|
|
|
951
951
|
maxEvents = 50,
|
|
952
952
|
scrollOffset = 0
|
|
953
953
|
}) => {
|
|
954
|
-
const end = events.length - scrollOffset;
|
|
954
|
+
const end = Math.max(0, events.length - scrollOffset);
|
|
955
955
|
const start = Math.max(0, end - maxEvents);
|
|
956
956
|
const visibleEvents = events.slice(start, end);
|
|
957
957
|
return /* @__PURE__ */ jsx9(Box9, { flexDirection: "column", children: visibleEvents.map((event, i) => {
|
|
@@ -6150,7 +6150,10 @@ var Root = () => {
|
|
|
6150
6150
|
}
|
|
6151
6151
|
return result;
|
|
6152
6152
|
});
|
|
6153
|
-
setScrollOffset(
|
|
6153
|
+
setScrollOffset((prev) => {
|
|
6154
|
+
if (prev === 0) return 0;
|
|
6155
|
+
return prev;
|
|
6156
|
+
});
|
|
6154
6157
|
}, []);
|
|
6155
6158
|
const scheduleFlush = useCallback7((immediate) => {
|
|
6156
6159
|
if (immediate) {
|
|
@@ -6166,6 +6169,7 @@ var Root = () => {
|
|
|
6166
6169
|
const handler = (event) => {
|
|
6167
6170
|
if (event.type === "clear_history") {
|
|
6168
6171
|
setEvents([]);
|
|
6172
|
+
setScrollOffset(0);
|
|
6169
6173
|
history.clear();
|
|
6170
6174
|
setPendingPrompt(null);
|
|
6171
6175
|
return;
|
|
@@ -6363,6 +6367,18 @@ var Root = () => {
|
|
|
6363
6367
|
return;
|
|
6364
6368
|
}
|
|
6365
6369
|
if (showPalette) return;
|
|
6370
|
+
if (matches.length === 0) {
|
|
6371
|
+
if (key.upArrow) {
|
|
6372
|
+
const step = key.shift ? dynamicMaxEvents : 1;
|
|
6373
|
+
setScrollOffset((prev) => Math.min(prev + step, Math.max(0, events.length - 1)));
|
|
6374
|
+
return;
|
|
6375
|
+
}
|
|
6376
|
+
if (key.downArrow) {
|
|
6377
|
+
const step = key.shift ? dynamicMaxEvents : 1;
|
|
6378
|
+
setScrollOffset((prev) => Math.max(prev - step, 0));
|
|
6379
|
+
return;
|
|
6380
|
+
}
|
|
6381
|
+
}
|
|
6366
6382
|
if (pendingPrompt || isBusy) return;
|
|
6367
6383
|
if (matches.length > 0) {
|
|
6368
6384
|
if (key.upArrow) {
|
|
@@ -6413,6 +6429,7 @@ var Root = () => {
|
|
|
6413
6429
|
const silent = matchingCommand?.isView || false;
|
|
6414
6430
|
bus.emitUser({ type: "user_input", content: trimmed, silent });
|
|
6415
6431
|
setInput("");
|
|
6432
|
+
setScrollOffset(0);
|
|
6416
6433
|
};
|
|
6417
6434
|
useEffect23(() => {
|
|
6418
6435
|
const uiHandler = (event) => {
|
|
@@ -6537,15 +6554,15 @@ var Root = () => {
|
|
|
6537
6554
|
Box33,
|
|
6538
6555
|
{
|
|
6539
6556
|
flexDirection: "column",
|
|
6540
|
-
flexGrow:
|
|
6557
|
+
flexGrow: 1,
|
|
6541
6558
|
overflowY: "hidden",
|
|
6542
|
-
justifyContent: "flex-end",
|
|
6559
|
+
justifyContent: events.length > dynamicMaxEvents ? "flex-end" : "flex-start",
|
|
6543
6560
|
children: activeView === "chat" ? /* @__PURE__ */ jsx33(
|
|
6544
6561
|
MessageList,
|
|
6545
6562
|
{
|
|
6546
6563
|
events,
|
|
6547
6564
|
maxEvents: dynamicMaxEvents,
|
|
6548
|
-
scrollOffset
|
|
6565
|
+
scrollOffset
|
|
6549
6566
|
}
|
|
6550
6567
|
) : renderView()
|
|
6551
6568
|
}
|
|
@@ -6587,6 +6604,15 @@ var Root = () => {
|
|
|
6587
6604
|
onResolve: handlePromptResolve
|
|
6588
6605
|
}
|
|
6589
6606
|
) }),
|
|
6607
|
+
scrollOffset > 0 && /* @__PURE__ */ jsxs32(Box33, { paddingX: 1, children: [
|
|
6608
|
+
/* @__PURE__ */ jsxs32(Text33, { color: "yellow", children: [
|
|
6609
|
+
"\u2191",
|
|
6610
|
+
" Scrolled up ",
|
|
6611
|
+
scrollOffset,
|
|
6612
|
+
" lines"
|
|
6613
|
+
] }),
|
|
6614
|
+
/* @__PURE__ */ jsx33(Text33, { dimColor: true, children: " \xB7 \u2193 scroll down \xB7 shift+\u2193 page down" })
|
|
6615
|
+
] }),
|
|
6590
6616
|
/* @__PURE__ */ jsxs32(Box33, { flexDirection: "column", children: [
|
|
6591
6617
|
/* @__PURE__ */ jsx33(Box33, { paddingX: 0, children: /* @__PURE__ */ jsx33(Text33, { dimColor: true, children: separatorLine }) }),
|
|
6592
6618
|
/* @__PURE__ */ jsxs32(Box33, { paddingX: 1, children: [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aurora-foundation/obsidian-next",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.11",
|
|
4
4
|
"description": "Next-gen AI Agent CLI",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -83,4 +83,4 @@
|
|
|
83
83
|
"contributors": [
|
|
84
84
|
"Polyoxy <iversonbusiness3@gmail.com>"
|
|
85
85
|
]
|
|
86
|
-
}
|
|
86
|
+
}
|