agentful 0.4.2 → 0.4.3
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/index.cjs +38 -9
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3044,7 +3044,7 @@ var VERSION, brand, useColor, wrap, paint, tuiDesign, sym, ui;
|
|
|
3044
3044
|
var init_branding = __esm({
|
|
3045
3045
|
"src/branding.ts"() {
|
|
3046
3046
|
"use strict";
|
|
3047
|
-
VERSION = "0.4.
|
|
3047
|
+
VERSION = "0.4.3" ? "0.4.3" : null.version;
|
|
3048
3048
|
brand = {
|
|
3049
3049
|
name: "agentful",
|
|
3050
3050
|
// the command users type
|
|
@@ -3664,7 +3664,17 @@ const plugin = {
|
|
|
3664
3664
|
}
|
|
3665
3665
|
|
|
3666
3666
|
// \u2500\u2500 prompt \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
3667
|
-
/**
|
|
3667
|
+
/**
|
|
3668
|
+
* Left half of the line under the input; replaces the engine's plain cwd.
|
|
3669
|
+
* Without a sessionID (the home screen) it falls back to the process
|
|
3670
|
+
* directory.
|
|
3671
|
+
*
|
|
3672
|
+
* The home screen needs it for a second reason: that line is
|
|
3673
|
+
* space-between, so with nothing on the left the engine's key hints
|
|
3674
|
+
* ("tab agents \xB7 ctrl+p commands") sit at column 0 \u2014 the one column the
|
|
3675
|
+
* clip below takes, which cost them their first character up to 0.4.2.
|
|
3676
|
+
* A hint on the left pushes them back to the right edge.
|
|
3677
|
+
*/
|
|
3668
3678
|
function Hint(props) {
|
|
3669
3679
|
const directory = () => safe(
|
|
3670
3680
|
() => api.state.session.get(props.sessionID).directory,
|
|
@@ -3689,16 +3699,34 @@ const plugin = {
|
|
|
3689
3699
|
* left, which puts the rail outside the visible area. Everything else
|
|
3690
3700
|
* keeps working because it is only a shift.
|
|
3691
3701
|
*
|
|
3692
|
-
* \u26A0\uFE0F
|
|
3693
|
-
*
|
|
3694
|
-
*
|
|
3695
|
-
*
|
|
3696
|
-
*
|
|
3702
|
+
* \u26A0\uFE0F The clip must NOT cover the whole component. api.ui.Prompt returns
|
|
3703
|
+
* TWO siblings: its own box, and the "/" + "@" completion list, which is
|
|
3704
|
+
* positioned absolutely ABOVE the input (a negative "top" against its
|
|
3705
|
+
* parent). A clip around both swallowed that list \u2014 the popup rendered
|
|
3706
|
+
* outside the clipped area, so it was never drawn and both triggers
|
|
3707
|
+
* looked dead while the keystrokes still went through (shipped in 0.4.2,
|
|
3708
|
+
* fixed here). So we take the children apart: the first goes inside the
|
|
3709
|
+
* clip, everything after it stays outside. The popup then anchors on the
|
|
3710
|
+
* outer box, which sits one column right of the shifted input \u2014 exactly
|
|
3711
|
+
* where its left edge belongs.
|
|
3712
|
+
*
|
|
3713
|
+
* \u26A0\uFE0F One column is the limit for the shift. The status line under the
|
|
3714
|
+
* input (our hint on the left) sits OUTSIDE that padded box and carries a
|
|
3715
|
+
* margin of just 1, so a wider clip eats the start of the working
|
|
3716
|
+
* directory \u2014 "/Users/\u2026" came out as "sers/\u2026" at -3. The rendering check
|
|
3717
|
+
* asserts the working directory, and the popup, for exactly this reason.
|
|
3697
3718
|
*/
|
|
3698
3719
|
function Field(props) {
|
|
3720
|
+
// Read once: in the engine's Solid runtime this getter runs the child
|
|
3721
|
+
// component, and each node may only be inserted into one parent.
|
|
3722
|
+
const parts = props.children
|
|
3723
|
+
const list = Array.isArray(parts) ? parts : [parts]
|
|
3699
3724
|
return (
|
|
3700
|
-
<box width="100%"
|
|
3701
|
-
<box
|
|
3725
|
+
<box width="100%">
|
|
3726
|
+
<box width="100%" overflow="hidden">
|
|
3727
|
+
<box marginLeft={-1} width="100%">{list[0]}</box>
|
|
3728
|
+
</box>
|
|
3729
|
+
{list.slice(1)}
|
|
3702
3730
|
</box>
|
|
3703
3731
|
)
|
|
3704
3732
|
}
|
|
@@ -3728,6 +3756,7 @@ const plugin = {
|
|
|
3728
3756
|
<Prompt
|
|
3729
3757
|
ref={data.ref}
|
|
3730
3758
|
placeholders={PLACEHOLDERS}
|
|
3759
|
+
hint={<Hint />}
|
|
3731
3760
|
right={<HostSlot name="home_prompt_right" />}
|
|
3732
3761
|
/>
|
|
3733
3762
|
</Field>
|