neoctl 0.2.11 → 0.2.12
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.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/dist/repl/index.js +3114 -314
- package/dist/repl/index.js.map +1 -1
- package/dist/tools/builtins/image-note-tool.js +1 -5
- package/dist/tools/builtins/image-note-tool.js.map +1 -1
- package/dist/web/html.js +8 -14
- package/dist/web/html.js.map +1 -1
- package/dist/web/index.d.ts +0 -5
- package/dist/web/index.js +5 -41
- package/dist/web/index.js.map +1 -1
- package/package.json +1 -1
- package/scripts/install-ripgrep.cjs +196 -196
- package/vendor/ripgrep/darwin-arm64/COPYING +3 -3
- package/vendor/ripgrep/darwin-arm64/LICENSE-MIT +21 -21
- package/vendor/ripgrep/darwin-arm64/UNLICENSE +24 -24
- package/vendor/ripgrep/darwin-arm64/manifest.json +7 -7
- package/vendor/ripgrep/darwin-x64/COPYING +3 -3
- package/vendor/ripgrep/darwin-x64/LICENSE-MIT +21 -21
- package/vendor/ripgrep/darwin-x64/UNLICENSE +24 -24
- package/vendor/ripgrep/darwin-x64/manifest.json +7 -7
- package/vendor/ripgrep/linux-arm64/COPYING +3 -3
- package/vendor/ripgrep/linux-arm64/LICENSE-MIT +21 -21
- package/vendor/ripgrep/linux-arm64/UNLICENSE +24 -24
- package/vendor/ripgrep/linux-arm64/manifest.json +7 -7
- package/vendor/ripgrep/linux-x64/COPYING +3 -3
- package/vendor/ripgrep/linux-x64/LICENSE-MIT +21 -21
- package/vendor/ripgrep/linux-x64/UNLICENSE +24 -24
- package/vendor/ripgrep/linux-x64/manifest.json +7 -7
- package/vendor/ripgrep/win32-arm64/manifest.json +7 -7
- package/dist/repl/browser.d.ts +0 -232
- package/dist/repl/browser.js +0 -156
- package/dist/repl/browser.js.map +0 -1
- package/dist/repl/env-file.d.ts +0 -4
- package/dist/repl/env-file.js +0 -97
- package/dist/repl/env-file.js.map +0 -1
- package/dist/repl/foreground-exec.d.ts +0 -10
- package/dist/repl/foreground-exec.js +0 -34
- package/dist/repl/foreground-exec.js.map +0 -1
- package/dist/repl/login-view.d.ts +0 -75
- package/dist/repl/login-view.js +0 -38
- package/dist/repl/login-view.js.map +0 -1
- package/dist/repl/login.d.ts +0 -14
- package/dist/repl/login.js +0 -165
- package/dist/repl/login.js.map +0 -1
- package/dist/repl/message-rendering.d.ts +0 -99
- package/dist/repl/message-rendering.js +0 -476
- package/dist/repl/message-rendering.js.map +0 -1
- package/dist/repl/prompt-payload.d.ts +0 -9
- package/dist/repl/prompt-payload.js +0 -64
- package/dist/repl/prompt-payload.js.map +0 -1
- package/dist/repl/prompt-view.d.ts +0 -235
- package/dist/repl/prompt-view.js +0 -184
- package/dist/repl/prompt-view.js.map +0 -1
- package/dist/repl/repl-types.d.ts +0 -88
- package/dist/repl/repl-types.js +0 -2
- package/dist/repl/repl-types.js.map +0 -1
- package/dist/repl/runtime.d.ts +0 -33
- package/dist/repl/runtime.js +0 -202
- package/dist/repl/runtime.js.map +0 -1
- package/dist/repl/slash-completion.d.ts +0 -28
- package/dist/repl/slash-completion.js +0 -287
- package/dist/repl/slash-completion.js.map +0 -1
- package/dist/repl/status-panel.d.ts +0 -234
- package/dist/repl/status-panel.js +0 -509
- package/dist/repl/status-panel.js.map +0 -1
- package/dist/repl/terminal.d.ts +0 -19
- package/dist/repl/terminal.js +0 -81
- package/dist/repl/terminal.js.map +0 -1
- package/dist/repl/tool-rendering.d.ts +0 -6
- package/dist/repl/tool-rendering.js +0 -502
- package/dist/repl/tool-rendering.js.map +0 -1
- package/dist/repl/usage.d.ts +0 -17
- package/dist/repl/usage.js +0 -57
- package/dist/repl/usage.js.map +0 -1
- package/dist/tips.d.ts +0 -10
- package/dist/tips.js +0 -168
- package/dist/tips.js.map +0 -1
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
The MIT License (MIT)
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2015 Andrew Gallant
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
|
13
|
-
all copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
-
THE SOFTWARE.
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2015 Andrew Gallant
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
This is free and unencumbered software released into the public domain.
|
|
2
|
-
|
|
3
|
-
Anyone is free to copy, modify, publish, use, compile, sell, or
|
|
4
|
-
distribute this software, either in source code form or as a compiled
|
|
5
|
-
binary, for any purpose, commercial or non-commercial, and by any
|
|
6
|
-
means.
|
|
7
|
-
|
|
8
|
-
In jurisdictions that recognize copyright laws, the author or authors
|
|
9
|
-
of this software dedicate any and all copyright interest in the
|
|
10
|
-
software to the public domain. We make this dedication for the benefit
|
|
11
|
-
of the public at large and to the detriment of our heirs and
|
|
12
|
-
successors. We intend this dedication to be an overt act of
|
|
13
|
-
relinquishment in perpetuity of all present and future rights to this
|
|
14
|
-
software under copyright law.
|
|
15
|
-
|
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
19
|
-
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
20
|
-
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
21
|
-
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
22
|
-
OTHER DEALINGS IN THE SOFTWARE.
|
|
23
|
-
|
|
24
|
-
For more information, please refer to <http://unlicense.org/>
|
|
1
|
+
This is free and unencumbered software released into the public domain.
|
|
2
|
+
|
|
3
|
+
Anyone is free to copy, modify, publish, use, compile, sell, or
|
|
4
|
+
distribute this software, either in source code form or as a compiled
|
|
5
|
+
binary, for any purpose, commercial or non-commercial, and by any
|
|
6
|
+
means.
|
|
7
|
+
|
|
8
|
+
In jurisdictions that recognize copyright laws, the author or authors
|
|
9
|
+
of this software dedicate any and all copyright interest in the
|
|
10
|
+
software to the public domain. We make this dedication for the benefit
|
|
11
|
+
of the public at large and to the detriment of our heirs and
|
|
12
|
+
successors. We intend this dedication to be an overt act of
|
|
13
|
+
relinquishment in perpetuity of all present and future rights to this
|
|
14
|
+
software under copyright law.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
19
|
+
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
20
|
+
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
21
|
+
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
22
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
|
23
|
+
|
|
24
|
+
For more information, please refer to <http://unlicense.org/>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "ripgrep",
|
|
3
|
-
"version": "15.1.0",
|
|
4
|
-
"source": "https://github.com/BurntSushi/ripgrep/releases/tag/15.1.0",
|
|
5
|
-
"asset": "ripgrep-15.1.0-aarch64-unknown-linux-gnu.tar.gz",
|
|
6
|
-
"installedAt": "2026-06-08T09:42:06.751Z"
|
|
7
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "ripgrep",
|
|
3
|
+
"version": "15.1.0",
|
|
4
|
+
"source": "https://github.com/BurntSushi/ripgrep/releases/tag/15.1.0",
|
|
5
|
+
"asset": "ripgrep-15.1.0-aarch64-unknown-linux-gnu.tar.gz",
|
|
6
|
+
"installedAt": "2026-06-08T09:42:06.751Z"
|
|
7
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
This project is dual-licensed under the Unlicense and MIT licenses.
|
|
2
|
-
|
|
3
|
-
You may use this code under the terms of either license.
|
|
1
|
+
This project is dual-licensed under the Unlicense and MIT licenses.
|
|
2
|
+
|
|
3
|
+
You may use this code under the terms of either license.
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
The MIT License (MIT)
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2015 Andrew Gallant
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
|
13
|
-
all copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
-
THE SOFTWARE.
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2015 Andrew Gallant
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
This is free and unencumbered software released into the public domain.
|
|
2
|
-
|
|
3
|
-
Anyone is free to copy, modify, publish, use, compile, sell, or
|
|
4
|
-
distribute this software, either in source code form or as a compiled
|
|
5
|
-
binary, for any purpose, commercial or non-commercial, and by any
|
|
6
|
-
means.
|
|
7
|
-
|
|
8
|
-
In jurisdictions that recognize copyright laws, the author or authors
|
|
9
|
-
of this software dedicate any and all copyright interest in the
|
|
10
|
-
software to the public domain. We make this dedication for the benefit
|
|
11
|
-
of the public at large and to the detriment of our heirs and
|
|
12
|
-
successors. We intend this dedication to be an overt act of
|
|
13
|
-
relinquishment in perpetuity of all present and future rights to this
|
|
14
|
-
software under copyright law.
|
|
15
|
-
|
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
19
|
-
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
20
|
-
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
21
|
-
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
22
|
-
OTHER DEALINGS IN THE SOFTWARE.
|
|
23
|
-
|
|
24
|
-
For more information, please refer to <http://unlicense.org/>
|
|
1
|
+
This is free and unencumbered software released into the public domain.
|
|
2
|
+
|
|
3
|
+
Anyone is free to copy, modify, publish, use, compile, sell, or
|
|
4
|
+
distribute this software, either in source code form or as a compiled
|
|
5
|
+
binary, for any purpose, commercial or non-commercial, and by any
|
|
6
|
+
means.
|
|
7
|
+
|
|
8
|
+
In jurisdictions that recognize copyright laws, the author or authors
|
|
9
|
+
of this software dedicate any and all copyright interest in the
|
|
10
|
+
software to the public domain. We make this dedication for the benefit
|
|
11
|
+
of the public at large and to the detriment of our heirs and
|
|
12
|
+
successors. We intend this dedication to be an overt act of
|
|
13
|
+
relinquishment in perpetuity of all present and future rights to this
|
|
14
|
+
software under copyright law.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
19
|
+
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
20
|
+
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
21
|
+
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
22
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
|
23
|
+
|
|
24
|
+
For more information, please refer to <http://unlicense.org/>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "ripgrep",
|
|
3
|
-
"version": "15.1.0",
|
|
4
|
-
"source": "https://github.com/BurntSushi/ripgrep/releases/tag/15.1.0",
|
|
5
|
-
"asset": "ripgrep-15.1.0-x86_64-unknown-linux-musl.tar.gz",
|
|
6
|
-
"installedAt": "2026-06-08T09:41:25.983Z"
|
|
7
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "ripgrep",
|
|
3
|
+
"version": "15.1.0",
|
|
4
|
+
"source": "https://github.com/BurntSushi/ripgrep/releases/tag/15.1.0",
|
|
5
|
+
"asset": "ripgrep-15.1.0-x86_64-unknown-linux-musl.tar.gz",
|
|
6
|
+
"installedAt": "2026-06-08T09:41:25.983Z"
|
|
7
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "ripgrep",
|
|
3
|
-
"version": "15.1.0",
|
|
4
|
-
"source": "https://github.com/BurntSushi/ripgrep/releases/tag/15.1.0",
|
|
5
|
-
"asset": "ripgrep-15.1.0-aarch64-pc-windows-msvc.zip",
|
|
6
|
-
"installedAt": "2026-06-08T09:40:39.867Z"
|
|
7
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "ripgrep",
|
|
3
|
+
"version": "15.1.0",
|
|
4
|
+
"source": "https://github.com/BurntSushi/ripgrep/releases/tag/15.1.0",
|
|
5
|
+
"asset": "ripgrep-15.1.0-aarch64-pc-windows-msvc.zip",
|
|
6
|
+
"installedAt": "2026-06-08T09:40:39.867Z"
|
|
7
|
+
}
|
package/dist/repl/browser.d.ts
DELETED
|
@@ -1,232 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import type { SessionStoreSnapshot, SessionSummary } from "../session/session-store.js";
|
|
3
|
-
import type { PagedBrowserState, SecretsBrowserState, SessionsBrowserState, SkillsBrowserState } from "./repl-types.js";
|
|
4
|
-
export declare function pagedPageCount(state: PagedBrowserState<unknown>): number;
|
|
5
|
-
export declare function pagedPageItems<TItem>(state: PagedBrowserState<TItem>): TItem[];
|
|
6
|
-
export declare function pagedAbsoluteIndex(state: PagedBrowserState<unknown>): number;
|
|
7
|
-
export declare function movePagedSelection<TState extends PagedBrowserState<unknown>>(state: TState, delta: number): TState;
|
|
8
|
-
export declare function movePagedPage<TState extends PagedBrowserState<unknown>>(state: TState, delta: number): TState;
|
|
9
|
-
export declare function sessionsPageItems(state: SessionsBrowserState): SessionSummary[];
|
|
10
|
-
export declare function sessionAbsoluteIndex(state: SessionsBrowserState): number;
|
|
11
|
-
export declare function moveSessionsSelection(state: SessionsBrowserState, delta: number): SessionsBrowserState;
|
|
12
|
-
export declare function moveSessionsPage(state: SessionsBrowserState, delta: number): SessionsBrowserState;
|
|
13
|
-
export declare function sessionsBrowserViewHeight(state: SessionsBrowserState): number;
|
|
14
|
-
export declare function skillsBrowserViewHeight(state: SkillsBrowserState): number;
|
|
15
|
-
export declare function secretsBrowserViewHeight(state: SecretsBrowserState): number;
|
|
16
|
-
export declare function SessionsBrowser({ state, width }: {
|
|
17
|
-
state: SessionsBrowserState;
|
|
18
|
-
width: number;
|
|
19
|
-
}): React.FunctionComponentElement<{
|
|
20
|
-
readonly position?: "absolute" | "relative" | undefined;
|
|
21
|
-
readonly columnGap?: number | undefined;
|
|
22
|
-
readonly rowGap?: number | undefined;
|
|
23
|
-
readonly gap?: number | undefined;
|
|
24
|
-
readonly margin?: number | undefined;
|
|
25
|
-
readonly marginX?: number | undefined;
|
|
26
|
-
readonly marginY?: number | undefined;
|
|
27
|
-
readonly marginTop?: number | undefined;
|
|
28
|
-
readonly marginBottom?: number | undefined;
|
|
29
|
-
readonly marginLeft?: number | undefined;
|
|
30
|
-
readonly marginRight?: number | undefined;
|
|
31
|
-
readonly padding?: number | undefined;
|
|
32
|
-
readonly paddingX?: number | undefined;
|
|
33
|
-
readonly paddingY?: number | undefined;
|
|
34
|
-
readonly paddingTop?: number | undefined;
|
|
35
|
-
readonly paddingBottom?: number | undefined;
|
|
36
|
-
readonly paddingLeft?: number | undefined;
|
|
37
|
-
readonly paddingRight?: number | undefined;
|
|
38
|
-
readonly flexGrow?: number | undefined;
|
|
39
|
-
readonly flexShrink?: number | undefined;
|
|
40
|
-
readonly flexDirection?: "row" | "column" | "row-reverse" | "column-reverse" | undefined;
|
|
41
|
-
readonly flexBasis?: number | string | undefined;
|
|
42
|
-
readonly flexWrap?: "nowrap" | "wrap" | "wrap-reverse" | undefined;
|
|
43
|
-
readonly alignItems?: "flex-start" | "center" | "flex-end" | "stretch" | undefined;
|
|
44
|
-
readonly alignSelf?: "flex-start" | "center" | "flex-end" | "auto" | undefined;
|
|
45
|
-
readonly justifyContent?: "flex-start" | "flex-end" | "space-between" | "space-around" | "space-evenly" | "center" | undefined;
|
|
46
|
-
readonly width?: number | string | undefined;
|
|
47
|
-
readonly height?: number | string | undefined;
|
|
48
|
-
readonly minWidth?: number | string | undefined;
|
|
49
|
-
readonly minHeight?: number | string | undefined;
|
|
50
|
-
readonly display?: "flex" | "none" | undefined;
|
|
51
|
-
readonly borderStyle?: (keyof import("cli-boxes").Boxes | import("cli-boxes").BoxStyle) | undefined;
|
|
52
|
-
readonly borderTop?: boolean | undefined;
|
|
53
|
-
readonly borderBottom?: boolean | undefined;
|
|
54
|
-
readonly borderLeft?: boolean | undefined;
|
|
55
|
-
readonly borderRight?: boolean | undefined;
|
|
56
|
-
readonly borderColor?: import("type-fest").LiteralUnion<import("ansi-styles").ForegroundColorName, string> | undefined;
|
|
57
|
-
readonly borderTopColor?: import("type-fest").LiteralUnion<import("ansi-styles").ForegroundColorName, string> | undefined;
|
|
58
|
-
readonly borderBottomColor?: import("type-fest").LiteralUnion<import("ansi-styles").ForegroundColorName, string> | undefined;
|
|
59
|
-
readonly borderLeftColor?: import("type-fest").LiteralUnion<import("ansi-styles").ForegroundColorName, string> | undefined;
|
|
60
|
-
readonly borderRightColor?: import("type-fest").LiteralUnion<import("ansi-styles").ForegroundColorName, string> | undefined;
|
|
61
|
-
readonly borderDimColor?: boolean | undefined;
|
|
62
|
-
readonly borderTopDimColor?: boolean | undefined;
|
|
63
|
-
readonly borderBottomDimColor?: boolean | undefined;
|
|
64
|
-
readonly borderLeftDimColor?: boolean | undefined;
|
|
65
|
-
readonly borderRightDimColor?: boolean | undefined;
|
|
66
|
-
readonly overflow?: "visible" | "hidden" | undefined;
|
|
67
|
-
readonly overflowX?: "visible" | "hidden" | undefined;
|
|
68
|
-
readonly overflowY?: "visible" | "hidden" | undefined;
|
|
69
|
-
readonly backgroundColor?: import("type-fest").LiteralUnion<import("ansi-styles").ForegroundColorName, string> | undefined;
|
|
70
|
-
} & {
|
|
71
|
-
readonly 'aria-label'?: string;
|
|
72
|
-
readonly 'aria-hidden'?: boolean;
|
|
73
|
-
readonly 'aria-role'?: "button" | "checkbox" | "combobox" | "list" | "listbox" | "listitem" | "menu" | "menuitem" | "option" | "progressbar" | "radio" | "radiogroup" | "tab" | "tablist" | "table" | "textbox" | "timer" | "toolbar";
|
|
74
|
-
readonly 'aria-state'?: {
|
|
75
|
-
readonly busy?: boolean;
|
|
76
|
-
readonly checked?: boolean;
|
|
77
|
-
readonly disabled?: boolean;
|
|
78
|
-
readonly expanded?: boolean;
|
|
79
|
-
readonly multiline?: boolean;
|
|
80
|
-
readonly multiselectable?: boolean;
|
|
81
|
-
readonly readonly?: boolean;
|
|
82
|
-
readonly required?: boolean;
|
|
83
|
-
readonly selected?: boolean;
|
|
84
|
-
};
|
|
85
|
-
} & {
|
|
86
|
-
children?: React.ReactNode | undefined;
|
|
87
|
-
} & React.RefAttributes<import("ink").DOMElement>>;
|
|
88
|
-
export declare function SkillsBrowser({ state, width }: {
|
|
89
|
-
state: SkillsBrowserState;
|
|
90
|
-
width: number;
|
|
91
|
-
}): React.FunctionComponentElement<{
|
|
92
|
-
readonly position?: "absolute" | "relative" | undefined;
|
|
93
|
-
readonly columnGap?: number | undefined;
|
|
94
|
-
readonly rowGap?: number | undefined;
|
|
95
|
-
readonly gap?: number | undefined;
|
|
96
|
-
readonly margin?: number | undefined;
|
|
97
|
-
readonly marginX?: number | undefined;
|
|
98
|
-
readonly marginY?: number | undefined;
|
|
99
|
-
readonly marginTop?: number | undefined;
|
|
100
|
-
readonly marginBottom?: number | undefined;
|
|
101
|
-
readonly marginLeft?: number | undefined;
|
|
102
|
-
readonly marginRight?: number | undefined;
|
|
103
|
-
readonly padding?: number | undefined;
|
|
104
|
-
readonly paddingX?: number | undefined;
|
|
105
|
-
readonly paddingY?: number | undefined;
|
|
106
|
-
readonly paddingTop?: number | undefined;
|
|
107
|
-
readonly paddingBottom?: number | undefined;
|
|
108
|
-
readonly paddingLeft?: number | undefined;
|
|
109
|
-
readonly paddingRight?: number | undefined;
|
|
110
|
-
readonly flexGrow?: number | undefined;
|
|
111
|
-
readonly flexShrink?: number | undefined;
|
|
112
|
-
readonly flexDirection?: "row" | "column" | "row-reverse" | "column-reverse" | undefined;
|
|
113
|
-
readonly flexBasis?: number | string | undefined;
|
|
114
|
-
readonly flexWrap?: "nowrap" | "wrap" | "wrap-reverse" | undefined;
|
|
115
|
-
readonly alignItems?: "flex-start" | "center" | "flex-end" | "stretch" | undefined;
|
|
116
|
-
readonly alignSelf?: "flex-start" | "center" | "flex-end" | "auto" | undefined;
|
|
117
|
-
readonly justifyContent?: "flex-start" | "flex-end" | "space-between" | "space-around" | "space-evenly" | "center" | undefined;
|
|
118
|
-
readonly width?: number | string | undefined;
|
|
119
|
-
readonly height?: number | string | undefined;
|
|
120
|
-
readonly minWidth?: number | string | undefined;
|
|
121
|
-
readonly minHeight?: number | string | undefined;
|
|
122
|
-
readonly display?: "flex" | "none" | undefined;
|
|
123
|
-
readonly borderStyle?: (keyof import("cli-boxes").Boxes | import("cli-boxes").BoxStyle) | undefined;
|
|
124
|
-
readonly borderTop?: boolean | undefined;
|
|
125
|
-
readonly borderBottom?: boolean | undefined;
|
|
126
|
-
readonly borderLeft?: boolean | undefined;
|
|
127
|
-
readonly borderRight?: boolean | undefined;
|
|
128
|
-
readonly borderColor?: import("type-fest").LiteralUnion<import("ansi-styles").ForegroundColorName, string> | undefined;
|
|
129
|
-
readonly borderTopColor?: import("type-fest").LiteralUnion<import("ansi-styles").ForegroundColorName, string> | undefined;
|
|
130
|
-
readonly borderBottomColor?: import("type-fest").LiteralUnion<import("ansi-styles").ForegroundColorName, string> | undefined;
|
|
131
|
-
readonly borderLeftColor?: import("type-fest").LiteralUnion<import("ansi-styles").ForegroundColorName, string> | undefined;
|
|
132
|
-
readonly borderRightColor?: import("type-fest").LiteralUnion<import("ansi-styles").ForegroundColorName, string> | undefined;
|
|
133
|
-
readonly borderDimColor?: boolean | undefined;
|
|
134
|
-
readonly borderTopDimColor?: boolean | undefined;
|
|
135
|
-
readonly borderBottomDimColor?: boolean | undefined;
|
|
136
|
-
readonly borderLeftDimColor?: boolean | undefined;
|
|
137
|
-
readonly borderRightDimColor?: boolean | undefined;
|
|
138
|
-
readonly overflow?: "visible" | "hidden" | undefined;
|
|
139
|
-
readonly overflowX?: "visible" | "hidden" | undefined;
|
|
140
|
-
readonly overflowY?: "visible" | "hidden" | undefined;
|
|
141
|
-
readonly backgroundColor?: import("type-fest").LiteralUnion<import("ansi-styles").ForegroundColorName, string> | undefined;
|
|
142
|
-
} & {
|
|
143
|
-
readonly 'aria-label'?: string;
|
|
144
|
-
readonly 'aria-hidden'?: boolean;
|
|
145
|
-
readonly 'aria-role'?: "button" | "checkbox" | "combobox" | "list" | "listbox" | "listitem" | "menu" | "menuitem" | "option" | "progressbar" | "radio" | "radiogroup" | "tab" | "tablist" | "table" | "textbox" | "timer" | "toolbar";
|
|
146
|
-
readonly 'aria-state'?: {
|
|
147
|
-
readonly busy?: boolean;
|
|
148
|
-
readonly checked?: boolean;
|
|
149
|
-
readonly disabled?: boolean;
|
|
150
|
-
readonly expanded?: boolean;
|
|
151
|
-
readonly multiline?: boolean;
|
|
152
|
-
readonly multiselectable?: boolean;
|
|
153
|
-
readonly readonly?: boolean;
|
|
154
|
-
readonly required?: boolean;
|
|
155
|
-
readonly selected?: boolean;
|
|
156
|
-
};
|
|
157
|
-
} & {
|
|
158
|
-
children?: React.ReactNode | undefined;
|
|
159
|
-
} & React.RefAttributes<import("ink").DOMElement>>;
|
|
160
|
-
export declare function SecretsBrowser({ state, width }: {
|
|
161
|
-
state: SecretsBrowserState;
|
|
162
|
-
width: number;
|
|
163
|
-
}): React.FunctionComponentElement<{
|
|
164
|
-
readonly position?: "absolute" | "relative" | undefined;
|
|
165
|
-
readonly columnGap?: number | undefined;
|
|
166
|
-
readonly rowGap?: number | undefined;
|
|
167
|
-
readonly gap?: number | undefined;
|
|
168
|
-
readonly margin?: number | undefined;
|
|
169
|
-
readonly marginX?: number | undefined;
|
|
170
|
-
readonly marginY?: number | undefined;
|
|
171
|
-
readonly marginTop?: number | undefined;
|
|
172
|
-
readonly marginBottom?: number | undefined;
|
|
173
|
-
readonly marginLeft?: number | undefined;
|
|
174
|
-
readonly marginRight?: number | undefined;
|
|
175
|
-
readonly padding?: number | undefined;
|
|
176
|
-
readonly paddingX?: number | undefined;
|
|
177
|
-
readonly paddingY?: number | undefined;
|
|
178
|
-
readonly paddingTop?: number | undefined;
|
|
179
|
-
readonly paddingBottom?: number | undefined;
|
|
180
|
-
readonly paddingLeft?: number | undefined;
|
|
181
|
-
readonly paddingRight?: number | undefined;
|
|
182
|
-
readonly flexGrow?: number | undefined;
|
|
183
|
-
readonly flexShrink?: number | undefined;
|
|
184
|
-
readonly flexDirection?: "row" | "column" | "row-reverse" | "column-reverse" | undefined;
|
|
185
|
-
readonly flexBasis?: number | string | undefined;
|
|
186
|
-
readonly flexWrap?: "nowrap" | "wrap" | "wrap-reverse" | undefined;
|
|
187
|
-
readonly alignItems?: "flex-start" | "center" | "flex-end" | "stretch" | undefined;
|
|
188
|
-
readonly alignSelf?: "flex-start" | "center" | "flex-end" | "auto" | undefined;
|
|
189
|
-
readonly justifyContent?: "flex-start" | "flex-end" | "space-between" | "space-around" | "space-evenly" | "center" | undefined;
|
|
190
|
-
readonly width?: number | string | undefined;
|
|
191
|
-
readonly height?: number | string | undefined;
|
|
192
|
-
readonly minWidth?: number | string | undefined;
|
|
193
|
-
readonly minHeight?: number | string | undefined;
|
|
194
|
-
readonly display?: "flex" | "none" | undefined;
|
|
195
|
-
readonly borderStyle?: (keyof import("cli-boxes").Boxes | import("cli-boxes").BoxStyle) | undefined;
|
|
196
|
-
readonly borderTop?: boolean | undefined;
|
|
197
|
-
readonly borderBottom?: boolean | undefined;
|
|
198
|
-
readonly borderLeft?: boolean | undefined;
|
|
199
|
-
readonly borderRight?: boolean | undefined;
|
|
200
|
-
readonly borderColor?: import("type-fest").LiteralUnion<import("ansi-styles").ForegroundColorName, string> | undefined;
|
|
201
|
-
readonly borderTopColor?: import("type-fest").LiteralUnion<import("ansi-styles").ForegroundColorName, string> | undefined;
|
|
202
|
-
readonly borderBottomColor?: import("type-fest").LiteralUnion<import("ansi-styles").ForegroundColorName, string> | undefined;
|
|
203
|
-
readonly borderLeftColor?: import("type-fest").LiteralUnion<import("ansi-styles").ForegroundColorName, string> | undefined;
|
|
204
|
-
readonly borderRightColor?: import("type-fest").LiteralUnion<import("ansi-styles").ForegroundColorName, string> | undefined;
|
|
205
|
-
readonly borderDimColor?: boolean | undefined;
|
|
206
|
-
readonly borderTopDimColor?: boolean | undefined;
|
|
207
|
-
readonly borderBottomDimColor?: boolean | undefined;
|
|
208
|
-
readonly borderLeftDimColor?: boolean | undefined;
|
|
209
|
-
readonly borderRightDimColor?: boolean | undefined;
|
|
210
|
-
readonly overflow?: "visible" | "hidden" | undefined;
|
|
211
|
-
readonly overflowX?: "visible" | "hidden" | undefined;
|
|
212
|
-
readonly overflowY?: "visible" | "hidden" | undefined;
|
|
213
|
-
readonly backgroundColor?: import("type-fest").LiteralUnion<import("ansi-styles").ForegroundColorName, string> | undefined;
|
|
214
|
-
} & {
|
|
215
|
-
readonly 'aria-label'?: string;
|
|
216
|
-
readonly 'aria-hidden'?: boolean;
|
|
217
|
-
readonly 'aria-role'?: "button" | "checkbox" | "combobox" | "list" | "listbox" | "listitem" | "menu" | "menuitem" | "option" | "progressbar" | "radio" | "radiogroup" | "tab" | "tablist" | "table" | "textbox" | "timer" | "toolbar";
|
|
218
|
-
readonly 'aria-state'?: {
|
|
219
|
-
readonly busy?: boolean;
|
|
220
|
-
readonly checked?: boolean;
|
|
221
|
-
readonly disabled?: boolean;
|
|
222
|
-
readonly expanded?: boolean;
|
|
223
|
-
readonly multiline?: boolean;
|
|
224
|
-
readonly multiselectable?: boolean;
|
|
225
|
-
readonly readonly?: boolean;
|
|
226
|
-
readonly required?: boolean;
|
|
227
|
-
readonly selected?: boolean;
|
|
228
|
-
};
|
|
229
|
-
} & {
|
|
230
|
-
children?: React.ReactNode | undefined;
|
|
231
|
-
} & React.RefAttributes<import("ink").DOMElement>>;
|
|
232
|
-
export declare function formatResume(snapshot: SessionStoreSnapshot): string;
|
package/dist/repl/browser.js
DELETED
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Box, Text } from "ink";
|
|
3
|
-
import stripAnsi from "strip-ansi";
|
|
4
|
-
const e = React.createElement;
|
|
5
|
-
export function pagedPageCount(state) {
|
|
6
|
-
return Math.max(1, Math.ceil(state.items.length / state.pageSize));
|
|
7
|
-
}
|
|
8
|
-
export function pagedPageItems(state) {
|
|
9
|
-
const start = state.pageIndex * state.pageSize;
|
|
10
|
-
return state.items.slice(start, start + state.pageSize);
|
|
11
|
-
}
|
|
12
|
-
export function pagedAbsoluteIndex(state) {
|
|
13
|
-
return state.pageIndex * state.pageSize + state.selectedIndex;
|
|
14
|
-
}
|
|
15
|
-
export function movePagedSelection(state, delta) {
|
|
16
|
-
const pageLength = pagedPageItems(state).length;
|
|
17
|
-
if (pageLength <= 0)
|
|
18
|
-
return state;
|
|
19
|
-
const selectedIndex = (state.selectedIndex + delta + pageLength) % pageLength;
|
|
20
|
-
return { ...state, selectedIndex };
|
|
21
|
-
}
|
|
22
|
-
export function movePagedPage(state, delta) {
|
|
23
|
-
const pageCount = pagedPageCount(state);
|
|
24
|
-
if (pageCount <= 1)
|
|
25
|
-
return state;
|
|
26
|
-
const pageIndex = (state.pageIndex + delta + pageCount) % pageCount;
|
|
27
|
-
const pageLength = state.items.slice(pageIndex * state.pageSize, pageIndex * state.pageSize + state.pageSize).length;
|
|
28
|
-
return { ...state, pageIndex, selectedIndex: Math.min(state.selectedIndex, Math.max(0, pageLength - 1)) };
|
|
29
|
-
}
|
|
30
|
-
export function sessionsPageItems(state) {
|
|
31
|
-
return pagedPageItems(state);
|
|
32
|
-
}
|
|
33
|
-
export function sessionAbsoluteIndex(state) {
|
|
34
|
-
return pagedAbsoluteIndex(state);
|
|
35
|
-
}
|
|
36
|
-
export function moveSessionsSelection(state, delta) {
|
|
37
|
-
return movePagedSelection(state, delta);
|
|
38
|
-
}
|
|
39
|
-
export function moveSessionsPage(state, delta) {
|
|
40
|
-
return movePagedPage(state, delta);
|
|
41
|
-
}
|
|
42
|
-
export function sessionsBrowserViewHeight(state) {
|
|
43
|
-
return sessionsPageItems(state).length + 3;
|
|
44
|
-
}
|
|
45
|
-
export function skillsBrowserViewHeight(state) {
|
|
46
|
-
return pagedPageItems(state).length + 3;
|
|
47
|
-
}
|
|
48
|
-
export function secretsBrowserViewHeight(state) {
|
|
49
|
-
return pagedPageItems(state).length + 3;
|
|
50
|
-
}
|
|
51
|
-
export function SessionsBrowser({ state, width }) {
|
|
52
|
-
const pageCount = pagedPageCount(state);
|
|
53
|
-
const pageItems = sessionsPageItems(state);
|
|
54
|
-
const showPagination = pageCount > 1;
|
|
55
|
-
const contentWidth = Math.max(20, width);
|
|
56
|
-
const header = showPagination
|
|
57
|
-
? `Saved sessions (${state.sessions.length}) · page ${state.pageIndex + 1}/${pageCount}`
|
|
58
|
-
: `Saved sessions (${state.sessions.length})`;
|
|
59
|
-
const footer = showPagination
|
|
60
|
-
? "arrows select · PgUp/PgDn page · Enter resume · d/Delete remove · Esc close"
|
|
61
|
-
: "arrows select · Enter resume · d/Delete remove · Esc close";
|
|
62
|
-
return e(Box, { flexDirection: "column", marginTop: 1 }, e(Text, { color: "cyan", bold: true }, fitToWidth(header, contentWidth)), ...pageItems.map((session, index) => {
|
|
63
|
-
const selected = index === state.selectedIndex;
|
|
64
|
-
const absoluteIndex = state.pageIndex * state.pageSize + index;
|
|
65
|
-
const row = formatSessionBrowserRow(session, absoluteIndex, contentWidth, state.runningSessionIds.includes(session.sessionId));
|
|
66
|
-
return e(Text, { key: session.sessionId, color: "white" }, e(Text, {
|
|
67
|
-
color: selected ? "black" : "white",
|
|
68
|
-
backgroundColor: selected ? "cyan" : undefined,
|
|
69
|
-
}, row.numberPrefix), row.rest);
|
|
70
|
-
}), e(Text, { color: "gray" }, fitToWidth(footer, contentWidth)));
|
|
71
|
-
}
|
|
72
|
-
export function SkillsBrowser({ state, width }) {
|
|
73
|
-
const pageCount = pagedPageCount(state);
|
|
74
|
-
const pageItems = pagedPageItems(state);
|
|
75
|
-
const showPagination = pageCount > 1;
|
|
76
|
-
const contentWidth = Math.max(20, width);
|
|
77
|
-
const header = showPagination
|
|
78
|
-
? `Skills (${state.skills.length}) · page ${state.pageIndex + 1}/${pageCount}`
|
|
79
|
-
: `Skills (${state.skills.length})`;
|
|
80
|
-
const footer = showPagination
|
|
81
|
-
? "arrows select · PgUp/PgDn page · Enter details · i invoke · a import · d/Delete remove · Esc close"
|
|
82
|
-
: "arrows select · Enter details · i invoke · a import · d/Delete remove · Esc close";
|
|
83
|
-
const nameWidth = Math.min(28, Math.max(...pageItems.map((skill) => skill.name.length)));
|
|
84
|
-
return e(Box, { flexDirection: "column", marginTop: 1 }, e(Text, { color: "cyan", bold: true }, fitToWidth(header, contentWidth)), ...pageItems.map((skill, index) => {
|
|
85
|
-
const selected = index === state.selectedIndex;
|
|
86
|
-
const absoluteIndex = state.pageIndex * state.pageSize + index;
|
|
87
|
-
const prefix = `${absoluteIndex + 1}.`.padStart(String(state.skills.length).length + 1);
|
|
88
|
-
const tags = skill.tags?.length ? ` [${skill.tags.join(",")}]` : "";
|
|
89
|
-
const execution = skill.execution ? ` (${skill.execution})` : "";
|
|
90
|
-
const restWidth = Math.max(0, contentWidth - prefix.length - nameWidth - 4);
|
|
91
|
-
const rest = fitToWidth(`${skill.description}${execution}${tags}`, restWidth);
|
|
92
|
-
return e(Text, { key: skill.name, color: "white" }, e(Text, { color: selected ? "black" : "white", backgroundColor: selected ? "cyan" : undefined }, prefix), e(Text, { color: "gray" }, " "), e(Text, { color: "cyan" }, fitToWidth(skill.name, nameWidth).padEnd(nameWidth)), e(Text, { color: "gray" }, " "), e(Text, { color: selected ? "white" : "gray" }, rest));
|
|
93
|
-
}), e(Text, { color: "gray" }, fitToWidth(footer, contentWidth)));
|
|
94
|
-
}
|
|
95
|
-
export function SecretsBrowser({ state, width }) {
|
|
96
|
-
const pageCount = pagedPageCount(state);
|
|
97
|
-
const pageItems = pagedPageItems(state);
|
|
98
|
-
const showPagination = pageCount > 1;
|
|
99
|
-
const contentWidth = Math.max(20, width);
|
|
100
|
-
const header = showPagination
|
|
101
|
-
? `Secrets (${state.secrets.length}) · page ${state.pageIndex + 1}/${pageCount}`
|
|
102
|
-
: `Secrets (${state.secrets.length})`;
|
|
103
|
-
const footer = showPagination
|
|
104
|
-
? "arrows select · PgUp/PgDn page · Enter info · s set · r rename · a add · e empty · d/Delete remove · Esc close"
|
|
105
|
-
: "arrows select · Enter info · s set · r rename · a add · e empty · d/Delete remove · Esc close";
|
|
106
|
-
const keyWidth = Math.min(32, Math.max(...pageItems.map((secret) => secret.key.length)));
|
|
107
|
-
return e(Box, { flexDirection: "column", marginTop: 1 }, e(Text, { color: "cyan", bold: true }, fitToWidth(header, contentWidth)), ...pageItems.map((secret, index) => {
|
|
108
|
-
const selected = index === state.selectedIndex;
|
|
109
|
-
const absoluteIndex = state.pageIndex * state.pageSize + index;
|
|
110
|
-
const prefix = `${absoluteIndex + 1}.`.padStart(String(state.secrets.length).length + 1);
|
|
111
|
-
const reason = secret.requestReason ? ` reason=${JSON.stringify(secret.requestReason)}` : "";
|
|
112
|
-
const restWidth = Math.max(0, contentWidth - prefix.length - keyWidth - 4);
|
|
113
|
-
const rest = fitToWidth(`${secret.status} · length=${secret.length}${reason}`, restWidth);
|
|
114
|
-
return e(Text, { key: secret.key, color: "white" }, e(Text, { color: selected ? "black" : "white", backgroundColor: selected ? "cyan" : undefined }, prefix), e(Text, { color: "gray" }, " "), e(Text, { color: secret.status === "set" ? "green" : "yellow" }, fitToWidth(secret.key, keyWidth).padEnd(keyWidth)), e(Text, { color: "gray" }, " "), e(Text, { color: selected ? "white" : "gray" }, rest));
|
|
115
|
-
}), e(Text, { color: "gray" }, fitToWidth(footer, contentWidth)));
|
|
116
|
-
}
|
|
117
|
-
export function formatResume(snapshot) {
|
|
118
|
-
return `resumed session ${snapshot.sessionId}: ${snapshot.resumedMessages} messages from ${snapshot.transcriptPath}`;
|
|
119
|
-
}
|
|
120
|
-
function formatSessionBrowserRow(session, absoluteIndex, width, running = false) {
|
|
121
|
-
const numberPrefix = `${absoluteIndex + 1}.`.padStart(4);
|
|
122
|
-
const title = session.title?.trim() || "(untitled)";
|
|
123
|
-
const runningTag = running ? " · running" : "";
|
|
124
|
-
const updated = session.updatedAt ? ` · ${formatSessionTimestamp(session.updatedAt)}` : "";
|
|
125
|
-
const messages = ` · ${session.messages} messages`;
|
|
126
|
-
const fixedParts = `${numberPrefix} ${runningTag}${updated}${messages}`;
|
|
127
|
-
const idBudget = Math.max(12, Math.min(32, Math.floor(width * 0.28)));
|
|
128
|
-
const id = truncateMiddle(session.sessionId, idBudget);
|
|
129
|
-
const titleBudget = Math.max(8, width - fixedParts.length - id.length - 5);
|
|
130
|
-
const row = fitToWidth(`${numberPrefix} ${truncateMiddle(title, titleBudget)} · ${id}${runningTag}${updated}${messages}`, width);
|
|
131
|
-
return { numberPrefix, rest: row.slice(numberPrefix.length) };
|
|
132
|
-
}
|
|
133
|
-
function formatSessionTimestamp(value) {
|
|
134
|
-
const date = new Date(value);
|
|
135
|
-
if (Number.isNaN(date.getTime()))
|
|
136
|
-
return value;
|
|
137
|
-
return date.toISOString().replace("T", " ").replace(/\.\d{3}Z$/, "Z");
|
|
138
|
-
}
|
|
139
|
-
function fitToWidth(value, width) {
|
|
140
|
-
const stripped = stripAnsi(value);
|
|
141
|
-
if (stripped.length === width)
|
|
142
|
-
return stripped;
|
|
143
|
-
if (stripped.length > width)
|
|
144
|
-
return stripped.slice(0, width);
|
|
145
|
-
return stripped.padEnd(width, " ");
|
|
146
|
-
}
|
|
147
|
-
function truncateMiddle(value, maxLength) {
|
|
148
|
-
if (value.length <= maxLength)
|
|
149
|
-
return value;
|
|
150
|
-
if (maxLength <= 3)
|
|
151
|
-
return value.slice(0, maxLength);
|
|
152
|
-
const left = Math.ceil((maxLength - 3) / 2);
|
|
153
|
-
const right = Math.floor((maxLength - 3) / 2);
|
|
154
|
-
return `${value.slice(0, left)}...${value.slice(value.length - right)}`;
|
|
155
|
-
}
|
|
156
|
-
//# sourceMappingURL=browser.js.map
|