gsd-pi 2.58.0-dev.e002a57 → 2.59.0-dev.023bd39
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/resources/skills/btw/SKILL.md +42 -0
- package/dist/web/standalone/.next/BUILD_ID +1 -1
- package/dist/web/standalone/.next/app-path-routes-manifest.json +16 -16
- package/dist/web/standalone/.next/build-manifest.json +2 -2
- package/dist/web/standalone/.next/prerender-manifest.json +3 -3
- package/dist/web/standalone/.next/server/app/_global-error.html +2 -2
- package/dist/web/standalone/.next/server/app/_global-error.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.html +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.html +1 -1
- package/dist/web/standalone/.next/server/app/index.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_full.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_index.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app-paths-manifest.json +16 -16
- package/dist/web/standalone/.next/server/pages/404.html +1 -1
- package/dist/web/standalone/.next/server/pages/500.html +2 -2
- package/dist/web/standalone/.next/server/server-reference-manifest.json +1 -1
- package/package.json +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/input-controller.d.ts +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/input-controller.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/input-controller.js +6 -0
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/input-controller.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/input-controller.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/input-controller.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/input-controller.test.js +122 -0
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/input-controller.test.js.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.js +30 -0
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/slash-command-handlers.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/slash-command-handlers.js +1 -7
- package/packages/pi-coding-agent/dist/modes/interactive/slash-command-handlers.js.map +1 -1
- package/packages/pi-coding-agent/package.json +1 -1
- package/packages/pi-coding-agent/src/modes/interactive/controllers/input-controller.test.ts +156 -0
- package/packages/pi-coding-agent/src/modes/interactive/controllers/input-controller.ts +7 -0
- package/packages/pi-coding-agent/src/modes/interactive/interactive-mode.ts +38 -0
- package/packages/pi-coding-agent/src/modes/interactive/slash-command-handlers.ts +1 -8
- package/pkg/package.json +1 -1
- package/src/resources/skills/btw/SKILL.md +42 -0
- /package/dist/web/standalone/.next/static/{nUA6d2OJrDSVq9RNb-c8b → QlWL-8CXgQpzV3ehkNMzh}/_buildManifest.js +0 -0
- /package/dist/web/standalone/.next/static/{nUA6d2OJrDSVq9RNb-c8b → QlWL-8CXgQpzV3ehkNMzh}/_ssgManifest.js +0 -0
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
3:I[66919,["8974","static/chunks/app/page-0c485498795110d6.js"],"default"]
|
|
4
4
|
6:I[90484,[],"OutletBoundary"]
|
|
5
5
|
7:"$Sreact.suspense"
|
|
6
|
-
0:{"buildId":"
|
|
6
|
+
0:{"buildId":"QlWL-8CXgQpzV3ehkNMzh","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],null,["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false}
|
|
7
7
|
4:{}
|
|
8
8
|
5:"$0:rsc:props:children:0:props:serverProvidedParams:params"
|
|
9
9
|
8:null
|
|
@@ -14,7 +14,7 @@ f:I[90484,[],"MetadataBoundary"]
|
|
|
14
14
|
:HL["/_next/static/media/93f479601ee12b01-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
|
|
15
15
|
:HL["/_next/static/css/de70bee13400563f.css","style"]
|
|
16
16
|
:HL["/_next/static/css/f6e8833d46e738d8.css","style"]
|
|
17
|
-
0:{"P":null,"b":"
|
|
17
|
+
0:{"P":null,"b":"QlWL-8CXgQpzV3ehkNMzh","c":["",""],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/de70bee13400563f.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/f6e8833d46e738d8.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","suppressHydrationWarning":true,"children":["$","body",null,{"className":"__variable_188709 __variable_9a8899 font-sans antialiased","children":["$","$L2",null,{"attribute":"class","defaultTheme":"dark","children":[["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}],["$","$L5",null,{"position":"bottom-right"}]]}]}]}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],null,["$","$La",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@c"}]}]]}],{},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],["$","div",null,{"hidden":true,"children":["$","$Lf",null,{"children":["$","$b",null,{"name":"Next.Metadata","children":"$L10"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$11",[]],"S":true}
|
|
18
18
|
8:{}
|
|
19
19
|
9:"$0:f:0:1:1:children:0:props:children:0:props:serverProvidedParams:params"
|
|
20
20
|
e:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"}]]
|
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
3:I[90484,[],"MetadataBoundary"]
|
|
4
4
|
4:"$Sreact.suspense"
|
|
5
5
|
5:I[86869,[],"IconMark"]
|
|
6
|
-
0:{"buildId":"
|
|
6
|
+
0:{"buildId":"QlWL-8CXgQpzV3ehkNMzh","rsc":["$","$1","h",{"children":[null,["$","$L2",null,{"children":[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"}]]}],["$","div",null,{"hidden":true,"children":["$","$L3",null,{"children":["$","$4",null,{"name":"Next.Metadata","children":[["$","title","0",{"children":"GSD"}],["$","meta","1",{"name":"description","content":"The evolution of Get Shit Done — now a real coding agent. One command. Walk away. Come back to a built project."}],["$","meta","2",{"name":"application-name","content":"GSD"}],["$","link","3",{"rel":"icon","href":"/icon-light-32x32.png","media":"(prefers-color-scheme: light)"}],["$","link","4",{"rel":"icon","href":"/icon-dark-32x32.png","media":"(prefers-color-scheme: dark)"}],["$","link","5",{"rel":"icon","href":"/icon.svg","type":"image/svg+xml"}],["$","$L5","6",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false}
|
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
5:I[61549,["4986","static/chunks/4986-c2fc8845ce785303.js","7177","static/chunks/app/layout-a16c7a7ecdf0c2cf.js"],"Toaster"]
|
|
6
6
|
:HL["/_next/static/css/de70bee13400563f.css","style"]
|
|
7
7
|
:HL["/_next/static/css/f6e8833d46e738d8.css","style"]
|
|
8
|
-
0:{"buildId":"
|
|
8
|
+
0:{"buildId":"QlWL-8CXgQpzV3ehkNMzh","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/de70bee13400563f.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/f6e8833d46e738d8.css","precedence":"next"}]],["$","html",null,{"lang":"en","suppressHydrationWarning":true,"children":["$","body",null,{"className":"__variable_188709 __variable_9a8899 font-sans antialiased","children":["$","$L2",null,{"attribute":"class","defaultTheme":"dark","children":[["$","$L3",null,{"parallelRouterKey":"children","template":["$","$L4",null,{}],"notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]]}],["$","$L5",null,{"position":"bottom-right"}]]}]}]}]]}],"loading":null,"isPartial":false}
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
:HL["/_next/static/media/93f479601ee12b01-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
|
|
3
3
|
:HL["/_next/static/css/de70bee13400563f.css","style"]
|
|
4
4
|
:HL["/_next/static/css/f6e8833d46e738d8.css","style"]
|
|
5
|
-
0:{"buildId":"
|
|
5
|
+
0:{"buildId":"QlWL-8CXgQpzV3ehkNMzh","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":true},"staleTime":300}
|
|
@@ -1,46 +1,46 @@
|
|
|
1
1
|
{
|
|
2
|
-
"/_global-error/page": "app/_global-error/page.js",
|
|
3
2
|
"/_not-found/page": "app/_not-found/page.js",
|
|
3
|
+
"/_global-error/page": "app/_global-error/page.js",
|
|
4
4
|
"/api/boot/route": "app/api/boot/route.js",
|
|
5
5
|
"/api/bridge-terminal/input/route": "app/api/bridge-terminal/input/route.js",
|
|
6
6
|
"/api/bridge-terminal/resize/route": "app/api/bridge-terminal/resize/route.js",
|
|
7
|
-
"/api/bridge-terminal/stream/route": "app/api/bridge-terminal/stream/route.js",
|
|
8
7
|
"/api/dev-mode/route": "app/api/dev-mode/route.js",
|
|
8
|
+
"/api/browse-directories/route": "app/api/browse-directories/route.js",
|
|
9
|
+
"/api/doctor/route": "app/api/doctor/route.js",
|
|
9
10
|
"/api/cleanup/route": "app/api/cleanup/route.js",
|
|
10
|
-
"/api/captures/route": "app/api/captures/route.js",
|
|
11
11
|
"/api/export-data/route": "app/api/export-data/route.js",
|
|
12
|
+
"/api/bridge-terminal/stream/route": "app/api/bridge-terminal/stream/route.js",
|
|
12
13
|
"/api/forensics/route": "app/api/forensics/route.js",
|
|
13
|
-
"/api/
|
|
14
|
-
"/api/doctor/route": "app/api/doctor/route.js",
|
|
15
|
-
"/api/git/route": "app/api/git/route.js",
|
|
14
|
+
"/api/captures/route": "app/api/captures/route.js",
|
|
16
15
|
"/api/history/route": "app/api/history/route.js",
|
|
16
|
+
"/api/git/route": "app/api/git/route.js",
|
|
17
17
|
"/api/hooks/route": "app/api/hooks/route.js",
|
|
18
|
-
"/api/experimental/route": "app/api/experimental/route.js",
|
|
19
18
|
"/api/inspect/route": "app/api/inspect/route.js",
|
|
19
|
+
"/api/experimental/route": "app/api/experimental/route.js",
|
|
20
20
|
"/api/knowledge/route": "app/api/knowledge/route.js",
|
|
21
21
|
"/api/live-state/route": "app/api/live-state/route.js",
|
|
22
|
-
"/api/preferences/route": "app/api/preferences/route.js",
|
|
23
22
|
"/api/recovery/route": "app/api/recovery/route.js",
|
|
24
|
-
"/api/projects/route": "app/api/projects/route.js",
|
|
25
23
|
"/api/onboarding/route": "app/api/onboarding/route.js",
|
|
24
|
+
"/api/preferences/route": "app/api/preferences/route.js",
|
|
25
|
+
"/api/projects/route": "app/api/projects/route.js",
|
|
26
26
|
"/api/session/browser/route": "app/api/session/browser/route.js",
|
|
27
27
|
"/api/session/command/route": "app/api/session/command/route.js",
|
|
28
|
-
"/api/session/events/route": "app/api/session/events/route.js",
|
|
29
28
|
"/api/session/manage/route": "app/api/session/manage/route.js",
|
|
30
29
|
"/api/settings-data/route": "app/api/settings-data/route.js",
|
|
31
30
|
"/api/shutdown/route": "app/api/shutdown/route.js",
|
|
32
|
-
"/api/
|
|
31
|
+
"/api/session/events/route": "app/api/session/events/route.js",
|
|
33
32
|
"/api/steer/route": "app/api/steer/route.js",
|
|
33
|
+
"/api/skill-health/route": "app/api/skill-health/route.js",
|
|
34
34
|
"/api/terminal/input/route": "app/api/terminal/input/route.js",
|
|
35
35
|
"/api/switch-root/route": "app/api/switch-root/route.js",
|
|
36
|
-
"/api/terminal/stream/route": "app/api/terminal/stream/route.js",
|
|
37
|
-
"/api/terminal/sessions/route": "app/api/terminal/sessions/route.js",
|
|
38
36
|
"/api/terminal/resize/route": "app/api/terminal/resize/route.js",
|
|
39
|
-
"/api/
|
|
40
|
-
"/api/
|
|
37
|
+
"/api/terminal/stream/route": "app/api/terminal/stream/route.js",
|
|
38
|
+
"/api/remote-questions/route": "app/api/remote-questions/route.js",
|
|
41
39
|
"/api/terminal/upload/route": "app/api/terminal/upload/route.js",
|
|
40
|
+
"/api/terminal/sessions/route": "app/api/terminal/sessions/route.js",
|
|
42
41
|
"/api/visualizer/route": "app/api/visualizer/route.js",
|
|
43
|
-
"/api/remote-questions/route": "app/api/remote-questions/route.js",
|
|
44
42
|
"/api/update/route": "app/api/update/route.js",
|
|
43
|
+
"/api/files/route": "app/api/files/route.js",
|
|
44
|
+
"/api/undo/route": "app/api/undo/route.js",
|
|
45
45
|
"/page": "app/page.js"
|
|
46
46
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><!--
|
|
1
|
+
<!DOCTYPE html><!--QlWL_8CXgQpzV3ehkNMzh--><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"/><link rel="preload" href="/_next/static/media/4cf2300e9c8272f7-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/93f479601ee12b01-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="stylesheet" href="/_next/static/css/de70bee13400563f.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/f6e8833d46e738d8.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-a1c1e452c6b32d04.js"/><script src="/_next/static/chunks/4bd1b696-e5d7c65570c947b7.js" async=""></script><script src="/_next/static/chunks/3794-337d1ca25ad99a89.js" async=""></script><script src="/_next/static/chunks/main-app-fdab67f7802d7832.js" async=""></script><script src="/_next/static/chunks/4986-c2fc8845ce785303.js" async=""></script><script src="/_next/static/chunks/app/layout-a16c7a7ecdf0c2cf.js" async=""></script><meta name="robots" content="noindex"/><meta name="next-size-adjust" content=""/><title>404: This page could not be found.</title><title>GSD</title><meta name="description" content="The evolution of Get Shit Done — now a real coding agent. One command. Walk away. Come back to a built project."/><meta name="application-name" content="GSD"/><link rel="icon" href="/icon-light-32x32.png" media="(prefers-color-scheme: light)"/><link rel="icon" href="/icon-dark-32x32.png" media="(prefers-color-scheme: dark)"/><link rel="icon" href="/icon.svg" type="image/svg+xml"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="__variable_188709 __variable_9a8899 font-sans antialiased"><div hidden=""><!--$--><!--/$--></div><script>((a,b,c,d,e,f,g,h)=>{let i=document.documentElement,j=["light","dark"];function k(b){var c;(Array.isArray(a)?a:[a]).forEach(a=>{let c="class"===a,d=c&&f?e.map(a=>f[a]||a):e;c?(i.classList.remove(...d),i.classList.add(f&&f[b]?f[b]:b)):i.setAttribute(a,b)}),c=b,h&&j.includes(c)&&(i.style.colorScheme=c)}if(d)k(d);else try{let a=localStorage.getItem(b)||c,d=g&&"system"===a?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":a;k(d)}catch(a){}})("class","theme","dark",null,["light","dark"],null,true,true)</script><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><section aria-label="Notifications alt+T" tabindex="-1" aria-live="polite" aria-relevant="additions text" aria-atomic="false"></section><script src="/_next/static/chunks/webpack-a1c1e452c6b32d04.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[21942,[\"4986\",\"static/chunks/4986-c2fc8845ce785303.js\",\"7177\",\"static/chunks/app/layout-a16c7a7ecdf0c2cf.js\"],\"ThemeProvider\"]\n3:I[57121,[],\"\"]\n4:I[74581,[],\"\"]\n5:I[61549,[\"4986\",\"static/chunks/4986-c2fc8845ce785303.js\",\"7177\",\"static/chunks/app/layout-a16c7a7ecdf0c2cf.js\"],\"Toaster\"]\n6:I[90484,[],\"OutletBoundary\"]\n7:\"$Sreact.suspense\"\n9:I[90484,[],\"ViewportBoundary\"]\nb:I[90484,[],\"MetadataBoundary\"]\nd:I[27123,[],\"\"]\n:HL[\"/_next/static/media/4cf2300e9c8272f7-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/media/93f479601ee12b01-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/css/de70bee13400563f.css\",\"style\"]\n:HL[\"/_next/static/css/f6e8833d46e738d8.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"QlWL-8CXgQpzV3ehkNMzh\",\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/de70bee13400563f.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/f6e8833d46e738d8.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"suppressHydrationWarning\":true,\"children\":[\"$\",\"body\",null,{\"className\":\"__variable_188709 __variable_9a8899 font-sans antialiased\",\"children\":[\"$\",\"$L2\",null,{\"attribute\":\"class\",\"defaultTheme\":\"dark\",\"children\":[[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}],[\"$\",\"$L5\",null,{\"position\":\"bottom-right\"}]]}]}]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L6\",null,{\"children\":[\"$\",\"$7\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@8\"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$L9\",null,{\"children\":\"$La\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$Lb\",null,{\"children\":[\"$\",\"$7\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lc\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$d\",[]],\"S\":true}\n"])</script><script>self.__next_f.push([1,"a:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no\"}]]\n"])</script><script>self.__next_f.push([1,"e:I[86869,[],\"IconMark\"]\n8:null\nc:[[\"$\",\"title\",\"0\",{\"children\":\"GSD\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"The evolution of Get Shit Done — now a real coding agent. One command. Walk away. Come back to a built project.\"}],[\"$\",\"meta\",\"2\",{\"name\":\"application-name\",\"content\":\"GSD\"}],[\"$\",\"link\",\"3\",{\"rel\":\"icon\",\"href\":\"/icon-light-32x32.png\",\"media\":\"(prefers-color-scheme: light)\"}],[\"$\",\"link\",\"4\",{\"rel\":\"icon\",\"href\":\"/icon-dark-32x32.png\",\"media\":\"(prefers-color-scheme: dark)\"}],[\"$\",\"link\",\"5\",{\"rel\":\"icon\",\"href\":\"/icon.svg\",\"type\":\"image/svg+xml\"}],[\"$\",\"$Le\",\"6\",{}]]\n"])</script></body></html>
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
<!DOCTYPE html><!--
|
|
2
|
-
@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/webpack-a1c1e452c6b32d04.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[57121,[],\"\"]\n3:I[74581,[],\"\"]\n4:I[90484,[],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n7:I[90484,[],\"ViewportBoundary\"]\n9:I[90484,[],\"MetadataBoundary\"]\nb:I[27123,[],\"\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"
|
|
1
|
+
<!DOCTYPE html><!--QlWL_8CXgQpzV3ehkNMzh--><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-a1c1e452c6b32d04.js"/><script src="/_next/static/chunks/4bd1b696-e5d7c65570c947b7.js" async=""></script><script src="/_next/static/chunks/3794-337d1ca25ad99a89.js" async=""></script><script src="/_next/static/chunks/main-app-fdab67f7802d7832.js" async=""></script><meta name="next-size-adjust" content=""/><title>500: Internal Server Error.</title><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}
|
|
2
|
+
@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/webpack-a1c1e452c6b32d04.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[57121,[],\"\"]\n3:I[74581,[],\"\"]\n4:I[90484,[],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n7:I[90484,[],\"ViewportBoundary\"]\n9:I[90484,[],\"MetadataBoundary\"]\nb:I[27123,[],\"\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"QlWL-8CXgQpzV3ehkNMzh\",\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"_global-error\",{\"children\":[\"__PAGE__\",{}]}]}],[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"title\",null,{\"children\":\"500: Internal Server Error.\"}]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"lineHeight\":\"48px\"},\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}\\n@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"paddingRight\":23,\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\"},\"children\":\"500\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"28px\"},\"children\":\"Internal Server Error.\"}]}]]}]}]}]]}],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L7\",null,{\"children\":\"$L8\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$L9\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$La\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$b\",[]],\"S\":true}\n"])</script><script>self.__next_f.push([1,"8:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"6:null\na:[]\n"])</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"node":{},"edge":{},"encryptionKey":"
|
|
1
|
+
{"node":{},"edge":{},"encryptionKey":"rLTBe2nDoc7CE2uAW+f5Zkrb6oWJuE3Gj6uilaqsw1E="}
|
package/package.json
CHANGED
|
@@ -6,6 +6,7 @@ export declare function setupEditorSubmitHandler(host: InteractiveModeStateHost
|
|
|
6
6
|
showError: (message: string) => void;
|
|
7
7
|
updateEditorBorderColor: () => void;
|
|
8
8
|
isExtensionCommand: (text: string) => boolean;
|
|
9
|
+
isKnownSlashCommand: (text: string) => boolean;
|
|
9
10
|
queueCompactionMessage: (text: string, mode: "steer" | "followUp") => void;
|
|
10
11
|
updatePendingMessagesDisplay: () => void;
|
|
11
12
|
flushPendingBashComponents: () => void;
|
package/packages/pi-coding-agent/dist/modes/interactive/controllers/input-controller.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-controller.d.ts","sourceRoot":"","sources":["../../../../src/modes/interactive/controllers/input-controller.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAE7E,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,wBAAwB,GAAG;IACzE,sBAAsB,EAAE,MAAM,GAAG,CAAC;IAClC,iBAAiB,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,kBAAkB,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACpF,WAAW,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,SAAS,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,uBAAuB,EAAE,MAAM,IAAI,CAAC;IACpC,kBAAkB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;IAC9C,sBAAsB,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,UAAU,KAAK,IAAI,CAAC;IAC3E,4BAA4B,EAAE,MAAM,IAAI,CAAC;IACzC,0BAA0B,EAAE,MAAM,IAAI,CAAC;IACvC,OAAO,CAAC,EAAE;QAAE,qBAAqB,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;CAC9C,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"input-controller.d.ts","sourceRoot":"","sources":["../../../../src/modes/interactive/controllers/input-controller.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAE7E,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,wBAAwB,GAAG;IACzE,sBAAsB,EAAE,MAAM,GAAG,CAAC;IAClC,iBAAiB,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,kBAAkB,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACpF,WAAW,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,SAAS,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,uBAAuB,EAAE,MAAM,IAAI,CAAC;IACpC,kBAAkB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;IAC9C,mBAAmB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;IAC/C,sBAAsB,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,UAAU,KAAK,IAAI,CAAC;IAC3E,4BAA4B,EAAE,MAAM,IAAI,CAAC;IACzC,0BAA0B,EAAE,MAAM,IAAI,CAAC;IACvC,OAAO,CAAC,EAAE;QAAE,qBAAqB,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;CAC9C,GAAG,IAAI,CA0FP"}
|
|
@@ -10,6 +10,12 @@ export function setupEditorSubmitHandler(host) {
|
|
|
10
10
|
host.editor.setText("");
|
|
11
11
|
return;
|
|
12
12
|
}
|
|
13
|
+
if (!host.isKnownSlashCommand(text)) {
|
|
14
|
+
const command = text.split(/\s/)[0];
|
|
15
|
+
host.showError(`Unknown command: ${command}. Use slash autocomplete to see available commands.`);
|
|
16
|
+
host.editor.setText("");
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
13
19
|
}
|
|
14
20
|
if (text.startsWith("!")) {
|
|
15
21
|
const isExcluded = text.startsWith("!!");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-controller.js","sourceRoot":"","sources":["../../../../src/modes/interactive/controllers/input-controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAGpE,MAAM,UAAU,wBAAwB,CAAC,
|
|
1
|
+
{"version":3,"file":"input-controller.js","sourceRoot":"","sources":["../../../../src/modes/interactive/controllers/input-controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAGpE,MAAM,UAAU,wBAAwB,CAAC,IAYxC;IACA,IAAI,CAAC,aAAa,CAAC,QAAQ,GAAG,KA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eStateHost } from \"../interactive-mode-state.js\";\n\nexport function setupEditorSubmitHandler(host: InteractiveModeStateHost & {\n\tgetSlashCommandContext: () => any;\n\thandleBashCommand: (command: string, excludeFromContext?: boolean) => Promise<void>;\n\tshowWarning: (message: string) => void;\n\tshowError: (message: string) => void;\n\tupdateEditorBorderColor: () => void;\n\tisExtensionCommand: (text: string) => boolean;\n\tisKnownSlashCommand: (text: string) => boolean;\n\tqueueCompactionMessage: (text: string, mode: \"steer\" | \"followUp\") => void;\n\tupdatePendingMessagesDisplay: () => void;\n\tflushPendingBashComponents: () => void;\n\toptions?: { submitPromptsDirectly?: boolean };\n}): void {\n\thost.defaultEditor.onSubmit = async (text: string) => {\n\t\ttext = text.trim();\n\t\tif (!text) return;\n\n\t\tif (text.startsWith(\"/\")) {\n\t\t\tconst handled = await dispatchSlashCommand(text, host.getSlashCommandContext());\n\t\t\tif (handled) {\n\t\t\t\thost.editor.setText(\"\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (!host.isKnownSlashCommand(text)) {\n\t\t\t\tconst command = text.split(/\\s/)[0];\n\t\t\t\thost.showError(`Unknown command: ${command}. Use slash autocomplete to see available commands.`);\n\t\t\t\thost.editor.setText(\"\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tif (text.startsWith(\"!\")) {\n\t\t\tconst isExcluded = text.startsWith(\"!!\");\n\t\t\tconst command = isExcluded ? text.slice(2).trim() : text.slice(1).trim();\n\t\t\tif (command) {\n\t\t\t\tif (host.session.isBashRunning) {\n\t\t\t\t\thost.showWarning(\"A bash command is already running. Press Esc to cancel it first.\");\n\t\t\t\t\thost.editor.setText(text);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\thost.editor.addToHistory?.(text);\n\t\t\t\tawait host.handleBashCommand(command, isExcluded);\n\t\t\t\thost.isBashMode = false;\n\t\t\t\thost.updateEditorBorderColor();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tif (host.session.isCompacting) {\n\t\t\tif (host.isExtensionCommand(text)) {\n\t\t\t\thost.editor.addToHistory?.(text);\n\t\t\t\thost.editor.setText(\"\");\n\t\t\t\ttry {\n\t\t\t\t\tawait host.session.prompt(text);\n\t\t\t\t} catch (error: unknown) {\n\t\t\t\t\tconst errorMessage = error instanceof Error ? error.message : \"Unknown error occurred\";\n\t\t\t\t\thost.showError(errorMessage);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\thost.queueCompactionMessage(text, \"steer\");\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tif (host.session.isStreaming) {\n\t\t\thost.editor.addToHistory?.(text);\n\t\t\thost.editor.setText(\"\");\n\t\t\tawait host.session.prompt(text, { streamingBehavior: \"steer\" });\n\t\t\thost.updatePendingMessagesDisplay();\n\t\t\thost.ui.requestRender();\n\t\t\treturn;\n\t\t}\n\n\t\thost.flushPendingBashComponents();\n\n\t\tif (host.onInputCallback) {\n\t\t\thost.onInputCallback(text);\n\t\t\thost.editor.addToHistory?.(text);\n\t\t\treturn;\n\t\t}\n\n\t\tif (host.options?.submitPromptsDirectly) {\n\t\t\thost.editor.addToHistory?.(text);\n\t\t\ttry {\n\t\t\t\tawait host.session.prompt(text);\n\t\t\t} catch (error: unknown) {\n\t\t\t\tconst errorMessage = error instanceof Error ? error.message : \"Unknown error occurred\";\n\t\t\t\thost.showError(errorMessage);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\thost.editor.addToHistory?.(text);\n\t\t// submitPromptsDirectly is false — still dispatch via session.prompt so user input\n\t\t// is not silently discarded.\n\t\ttry {\n\t\t\tawait host.session.prompt(text);\n\t\t} catch (error: unknown) {\n\t\t\tconst errorMessage = error instanceof Error ? error.message : \"Unknown error occurred\";\n\t\t\thost.showError(errorMessage);\n\t\t}\n\t};\n}\n"]}
|
package/packages/pi-coding-agent/dist/modes/interactive/controllers/input-controller.test.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-controller.test.d.ts","sourceRoot":"","sources":["../../../../src/modes/interactive/controllers/input-controller.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import assert from "node:assert/strict";
|
|
2
|
+
import test from "node:test";
|
|
3
|
+
import { setupEditorSubmitHandler } from "./input-controller.js";
|
|
4
|
+
function getSlashCommandName(text) {
|
|
5
|
+
const trimmed = text.trim();
|
|
6
|
+
const spaceIndex = trimmed.indexOf(" ");
|
|
7
|
+
return spaceIndex === -1 ? trimmed.slice(1) : trimmed.slice(1, spaceIndex);
|
|
8
|
+
}
|
|
9
|
+
function createHost(options = {}) {
|
|
10
|
+
const prompted = [];
|
|
11
|
+
const errors = [];
|
|
12
|
+
const warnings = [];
|
|
13
|
+
const history = [];
|
|
14
|
+
const knownSlashCommands = new Set(options.knownSlashCommands ?? []);
|
|
15
|
+
let editorText = "";
|
|
16
|
+
let settingsOpened = 0;
|
|
17
|
+
const editor = {
|
|
18
|
+
setText(text) {
|
|
19
|
+
editorText = text;
|
|
20
|
+
},
|
|
21
|
+
getText() {
|
|
22
|
+
return editorText;
|
|
23
|
+
},
|
|
24
|
+
addToHistory(text) {
|
|
25
|
+
history.push(text);
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
const host = {
|
|
29
|
+
defaultEditor: editor,
|
|
30
|
+
editor,
|
|
31
|
+
session: {
|
|
32
|
+
isBashRunning: false,
|
|
33
|
+
isCompacting: false,
|
|
34
|
+
isStreaming: false,
|
|
35
|
+
prompt: async (text) => {
|
|
36
|
+
prompted.push(text);
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
ui: {
|
|
40
|
+
requestRender() { },
|
|
41
|
+
},
|
|
42
|
+
getSlashCommandContext: () => ({
|
|
43
|
+
showSettingsSelector: () => {
|
|
44
|
+
settingsOpened += 1;
|
|
45
|
+
},
|
|
46
|
+
}),
|
|
47
|
+
handleBashCommand: async () => { },
|
|
48
|
+
showWarning(message) {
|
|
49
|
+
warnings.push(message);
|
|
50
|
+
},
|
|
51
|
+
showError(message) {
|
|
52
|
+
errors.push(message);
|
|
53
|
+
},
|
|
54
|
+
updateEditorBorderColor() { },
|
|
55
|
+
isExtensionCommand() {
|
|
56
|
+
return false;
|
|
57
|
+
},
|
|
58
|
+
isKnownSlashCommand(text) {
|
|
59
|
+
return knownSlashCommands.has(getSlashCommandName(text));
|
|
60
|
+
},
|
|
61
|
+
queueCompactionMessage() { },
|
|
62
|
+
updatePendingMessagesDisplay() { },
|
|
63
|
+
flushPendingBashComponents() { },
|
|
64
|
+
};
|
|
65
|
+
setupEditorSubmitHandler(host);
|
|
66
|
+
return {
|
|
67
|
+
host: host,
|
|
68
|
+
prompted,
|
|
69
|
+
errors,
|
|
70
|
+
warnings,
|
|
71
|
+
history,
|
|
72
|
+
getEditorText: () => editorText,
|
|
73
|
+
getSettingsOpened: () => settingsOpened,
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
test("input-controller: built-in slash commands stay in TUI dispatch", async () => {
|
|
77
|
+
const { host, prompted, errors, getSettingsOpened, getEditorText } = createHost();
|
|
78
|
+
await host.defaultEditor.onSubmit("/settings");
|
|
79
|
+
assert.equal(getSettingsOpened(), 1, "built-in /settings should open the settings selector");
|
|
80
|
+
assert.deepEqual(prompted, [], "built-in slash commands should not reach session.prompt");
|
|
81
|
+
assert.deepEqual(errors, [], "built-in slash commands should not show errors");
|
|
82
|
+
assert.equal(getEditorText(), "", "built-in slash commands should clear the editor after handling");
|
|
83
|
+
});
|
|
84
|
+
test("input-controller: extension slash commands fall through to session.prompt", async () => {
|
|
85
|
+
const { host, prompted, errors, history } = createHost({ knownSlashCommands: ["gsd"] });
|
|
86
|
+
await host.defaultEditor.onSubmit("/gsd help");
|
|
87
|
+
assert.deepEqual(prompted, ["/gsd help"], "known extension slash commands should reach session.prompt");
|
|
88
|
+
assert.deepEqual(errors, [], "known extension slash commands should not show unknown-command errors");
|
|
89
|
+
assert.deepEqual(history, ["/gsd help"], "known extension slash commands should still be added to history");
|
|
90
|
+
});
|
|
91
|
+
test("input-controller: prompt template slash commands fall through to session.prompt", async () => {
|
|
92
|
+
const { host, prompted, errors } = createHost({ knownSlashCommands: ["daily"] });
|
|
93
|
+
await host.defaultEditor.onSubmit("/daily focus area");
|
|
94
|
+
assert.deepEqual(prompted, ["/daily focus area"]);
|
|
95
|
+
assert.deepEqual(errors, []);
|
|
96
|
+
});
|
|
97
|
+
test("input-controller: skill slash commands fall through to session.prompt", async () => {
|
|
98
|
+
const { host, prompted, errors } = createHost({ knownSlashCommands: ["skill:create-skill"] });
|
|
99
|
+
await host.defaultEditor.onSubmit("/skill:create-skill routing bug");
|
|
100
|
+
assert.deepEqual(prompted, ["/skill:create-skill routing bug"]);
|
|
101
|
+
assert.deepEqual(errors, []);
|
|
102
|
+
});
|
|
103
|
+
test("input-controller: disabled skill slash commands stay unknown", async () => {
|
|
104
|
+
const { host, prompted, errors } = createHost();
|
|
105
|
+
await host.defaultEditor.onSubmit("/skill:create-skill routing bug");
|
|
106
|
+
assert.deepEqual(prompted, []);
|
|
107
|
+
assert.deepEqual(errors, ["Unknown command: /skill:create-skill. Use slash autocomplete to see available commands."]);
|
|
108
|
+
});
|
|
109
|
+
test("input-controller: /export prefix does not swallow unrelated slash commands", async () => {
|
|
110
|
+
const { host, prompted, errors } = createHost();
|
|
111
|
+
await host.defaultEditor.onSubmit("/exportfoo");
|
|
112
|
+
assert.deepEqual(prompted, []);
|
|
113
|
+
assert.deepEqual(errors, ["Unknown command: /exportfoo. Use slash autocomplete to see available commands."]);
|
|
114
|
+
});
|
|
115
|
+
test("input-controller: truly unknown slash commands stop before session.prompt", async () => {
|
|
116
|
+
const { host, prompted, errors, getEditorText } = createHost();
|
|
117
|
+
await host.defaultEditor.onSubmit("/definitely-not-a-command");
|
|
118
|
+
assert.deepEqual(prompted, [], "unknown slash commands should not reach session.prompt");
|
|
119
|
+
assert.deepEqual(errors, ["Unknown command: /definitely-not-a-command. Use slash autocomplete to see available commands."]);
|
|
120
|
+
assert.equal(getEditorText(), "", "unknown slash commands should clear the editor after showing the error");
|
|
121
|
+
});
|
|
122
|
+
//# sourceMappingURL=input-controller.test.js.map
|
package/packages/pi-coding-agent/dist/modes/interactive/controllers/input-controller.test.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-controller.test.js","sourceRoot":"","sources":["../../../../src/modes/interactive/controllers/input-controller.test.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AAMjE,SAAS,mBAAmB,CAAC,IAAY;IACxC,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;IAC5B,MAAM,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACxC,OAAO,UAAU,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;AAC5E,CAAC;AAED,SAAS,UAAU,CAAC,UAAuB,EAAE;IAC5C,MAAM,QAAQ,GAAa,EAAE,CAAC;IAC9B,MAAM,MAAM,GAAa,EAAE,CAAC;IAC5B,MAAM,QAAQ,GAAa,EAAE,CAAC;IAC9B,MAAM,OAAO,GAAa,EAAE,CAAC;IAC7B,MAAM,kBAAkB,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,kBAAkB,IAAI,EAAE,CAAC,CAAC;IACrE,IAAI,UAAU,GAAG,EAAE,CAAC;IACpB,IAAI,cAAc,GAAG,CAAC,CAAC;IAEvB,MAAM,MAAM,GAAG;QACd,OAAO,CAAC,IAAY;YACnB,UAAU,GAAG,IAAI,CAAC;QACnB,CAAC;QACD,OAAO;YACN,OAAO,UAAU,CAAC;QACnB,CAAC;QACD,YA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EhD,MAAM,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;IAEhD,MAAM,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;IAC/B,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,CAAC,gFAAgF,CAAC,CAAC,CAAC;AAC9G,CAAC,CAAC,CAAC;AAEH,IAAI,CAAC,2EAA2E,EAAE,KAAK,IAAI,EAAE;IAC5F,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,aAAa,EAAE,GAAG,UAAU,EAAE,CAAC;IAE/D,MAAM,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,2BAA2B,CAAC,CAAC;IAE/D,MAAM,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAE,EAAE,wDAAwD,CAAC,CAAC;IACzF,MAAM,CAAC,SAAS,CACf,MAAM,EACN,CAAC,+FAA+F,CAAC,CACjG,CAAC;IACF,MAAM,CAAC,KAAK,CAAC,aAAa,EAAE,EAAE,EAAE,EAAE,wEAAwE,CAAC,CAAC;AAC7G,CAAC,CAAC,CAAC","sourcesContent":["import assert from \"node:assert/strict\";\nimport test from \"node:test\";\n\nimport { setupEditorSubmitHandler } from \"./input-controller.js\";\n\ntype HostOptions = {\n\tknownSlashCommands?: string[];\n};\n\nfunction getSlashCommandName(text: string): string {\n\tconst trimmed = text.trim();\n\tconst spaceIndex = trimmed.indexOf(\" \");\n\treturn spaceIndex === -1 ? trimmed.slice(1) : trimmed.slice(1, spaceIndex);\n}\n\nfunction createHost(options: HostOptions = {}) {\n\tconst prompted: string[] = [];\n\tconst errors: string[] = [];\n\tconst warnings: string[] = [];\n\tconst history: string[] = [];\n\tconst knownSlashCommands = new Set(options.knownSlashCommands ?? []);\n\tlet editorText = \"\";\n\tlet settingsOpened = 0;\n\n\tconst editor = {\n\t\tsetText(text: string) {\n\t\t\teditorText = text;\n\t\t},\n\t\tgetText() {\n\t\t\treturn editorText;\n\t\t},\n\t\taddToHistory(text: string) {\n\t\t\thistory.push(text);\n\t\t},\n\t};\n\n\tconst host = {\n\t\tdefaultEditor: editor as typeof editor & { onSubmit?: (text: string) => Promise<void> },\n\t\teditor,\n\t\tsession: {\n\t\t\tisBashRunning: false,\n\t\t\tisCompacting: false,\n\t\t\tisStreaming: false,\n\t\t\tprompt: async (text: string) => {\n\t\t\t\tprompted.push(text);\n\t\t\t},\n\t\t},\n\t\tui: {\n\t\t\trequestRender() {},\n\t\t},\n\t\tgetSlashCommandContext: () => ({\n\t\t\tshowSettingsSelector: () => {\n\t\t\t\tsettingsOpened += 1;\n\t\t\t},\n\t\t}),\n\t\thandleBashCommand: async () => {},\n\t\tshowWarning(message: string) {\n\t\t\twarnings.push(message);\n\t\t},\n\t\tshowError(message: string) {\n\t\t\terrors.push(message);\n\t\t},\n\t\tupdateEditorBorderColor() {},\n\t\tisExtensionCommand() {\n\t\t\treturn false;\n\t\t},\n\t\tisKnownSlashCommand(text: string) {\n\t\t\treturn knownSlashCommands.has(getSlashCommandName(text));\n\t\t},\n\t\tqueueCompactionMessage() {},\n\t\tupdatePendingMessagesDisplay() {},\n\t\tflushPendingBashComponents() {},\n\t};\n\n\tsetupEditorSubmitHandler(host as any);\n\n\treturn {\n\t\thost: host as typeof host & { defaultEditor: typeof editor & { onSubmit: (text: string) => Promise<void> } },\n\t\tprompted,\n\t\terrors,\n\t\twarnings,\n\t\thistory,\n\t\tgetEditorText: () => editorText,\n\t\tgetSettingsOpened: () => settingsOpened,\n\t};\n}\n\ntest(\"input-controller: built-in slash commands stay in TUI dispatch\", async () => {\n\tconst { host, prompted, errors, getSettingsOpened, getEditorText } = createHost();\n\n\tawait host.defaultEditor.onSubmit(\"/settings\");\n\n\tassert.equal(getSettingsOpened(), 1, \"built-in /settings should open the settings selector\");\n\tassert.deepEqual(prompted, [], \"built-in slash commands should not reach session.prompt\");\n\tassert.deepEqual(errors, [], \"built-in slash commands should not show errors\");\n\tassert.equal(getEditorText(), \"\", \"built-in slash commands should clear the editor after handling\");\n});\n\ntest(\"input-controller: extension slash commands fall through to session.prompt\", async () => {\n\tconst { host, prompted, errors, history } = createHost({ knownSlashCommands: [\"gsd\"] });\n\n\tawait host.defaultEditor.onSubmit(\"/gsd help\");\n\n\tassert.deepEqual(prompted, [\"/gsd help\"], \"known extension slash commands should reach session.prompt\");\n\tassert.deepEqual(errors, [], \"known extension slash commands should not show unknown-command errors\");\n\tassert.deepEqual(history, [\"/gsd help\"], \"known extension slash commands should still be added to history\");\n});\n\ntest(\"input-controller: prompt template slash commands fall through to session.prompt\", async () => {\n\tconst { host, prompted, errors } = createHost({ knownSlashCommands: [\"daily\"] });\n\n\tawait host.defaultEditor.onSubmit(\"/daily focus area\");\n\n\tassert.deepEqual(prompted, [\"/daily focus area\"]);\n\tassert.deepEqual(errors, []);\n});\n\ntest(\"input-controller: skill slash commands fall through to session.prompt\", async () => {\n\tconst { host, prompted, errors } = createHost({ knownSlashCommands: [\"skill:create-skill\"] });\n\n\tawait host.defaultEditor.onSubmit(\"/skill:create-skill routing bug\");\n\n\tassert.deepEqual(prompted, [\"/skill:create-skill routing bug\"]);\n\tassert.deepEqual(errors, []);\n});\n\ntest(\"input-controller: disabled skill slash commands stay unknown\", async () => {\n\tconst { host, prompted, errors } = createHost();\n\n\tawait host.defaultEditor.onSubmit(\"/skill:create-skill routing bug\");\n\n\tassert.deepEqual(prompted, []);\n\tassert.deepEqual(errors, [\"Unknown command: /skill:create-skill. Use slash autocomplete to see available commands.\"]);\n});\n\ntest(\"input-controller: /export prefix does not swallow unrelated slash commands\", async () => {\n\tconst { host, prompted, errors } = createHost();\n\n\tawait host.defaultEditor.onSubmit(\"/exportfoo\");\n\n\tassert.deepEqual(prompted, []);\n\tassert.deepEqual(errors, [\"Unknown command: /exportfoo. Use slash autocomplete to see available commands.\"]);\n});\n\ntest(\"input-controller: truly unknown slash commands stop before session.prompt\", async () => {\n\tconst { host, prompted, errors, getEditorText } = createHost();\n\n\tawait host.defaultEditor.onSubmit(\"/definitely-not-a-command\");\n\n\tassert.deepEqual(prompted, [], \"unknown slash commands should not reach session.prompt\");\n\tassert.deepEqual(\n\t\terrors,\n\t\t[\"Unknown command: /definitely-not-a-command. Use slash autocomplete to see available commands.\"],\n\t);\n\tassert.equal(getEditorText(), \"\", \"unknown slash commands should clear the editor after showing the error\");\n});\n"]}
|
|
@@ -291,6 +291,7 @@ export declare class InteractiveMode {
|
|
|
291
291
|
private restoreQueuedMessagesToEditor;
|
|
292
292
|
private queueCompactionMessage;
|
|
293
293
|
private isExtensionCommand;
|
|
294
|
+
private isKnownSlashCommand;
|
|
294
295
|
private flushCompactionQueue;
|
|
295
296
|
/** Move pending bash components from pending area to chat */
|
|
296
297
|
private flushPendingBashComponents;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interactive-mode.d.ts","sourceRoot":"","sources":["../../../src/modes/interactive/interactive-mode.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,KAAK,EAAoB,YAAY,EAAmC,MAAM,YAAY,CAAC;AAWlG,OAAO,EAUN,KAAK,QAAQ,IAAI,WAAW,EAK5B,MAAM,aAAa,CAAC;AASrB,OAAO,EAAE,KAAK,YAAY,EAA2C,MAAM,6BAA6B,CAAC;AAEzG,OAAO,KAAK,EAGX,kBAAkB,EAGlB,MAAM,gCAAgC,CAAC;AA+ExC;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACtC,gEAAgE;IAChE,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,4DAA4D;IAC5D,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,qEAAqE;IACrE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,8CAA8C;IAC9C,aAAa,CAAC,EAAE,YAAY,EAAE,CAAC;IAC/B,4DAA4D;IAC5D,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,6DAA6D;IAC7D,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,4DAA4D;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,IAAI;IAMrC,WAAW,CAAC,cAAc,EAAE,MAAM,GAAG,IAAI;IAMzC,0BAA0B,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;IAsBpD;;;OAGG;IACH,OAAO,CAAC,oBAAoB;IAa5B;;;OAGG;IACH,OAAO,CAAC,cAAc;IAetB,OAAO,CAAC,4BAA4B;IAmBpC,OAAO,CAAC,6BAA6B;IAqBrC,OAAO,CAAC,sBAAsB;IAc9B,OAAO,CAAC,kBAAkB;IAW1B,OAAO,CAAC,mBAAmB;YA0Bb,oBAAoB;IA6ElC,6DAA6D;IAC7D,OAAO,CAAC,0BAA0B;IAYlC;;;OAGG;IACH,OAAO,CAAC,YAAY;IAapB,OAAO,CAAC,oBAAoB;YA+Id,kBAAkB;YAIlB,mBAAmB;YAInB,kBAAkB;IAIhC,iFAAiF;YACnE,4BAA4B;IAI1C,OAAO,CAAC,iBAAiB;YA+BX,kBAAkB;IAsHhC,OAAO,CAAC,uBAAuB;IAmC/B,OAAO,CAAC,gBAAgB;IAgIxB,OAAO,CAAC,mBAAmB;YAmCb,mBAAmB;IA6BjC,OAAO,CAAC,mBAAmB;YA+Bb,iBAAiB;YAuEjB,eAAe;YAgGf,mBAAmB;YAuEnB,kBAAkB;IAyBhC,OAAO,CAAC,kBAAkB;IAiC1B,OAAO,CAAC,aAAa;IAMrB,OAAO,CAAC,qBAAqB;YAMf,iBAAiB;YA0FjB,iBAAiB;IAwD/B,aAAa,CAAC,KAAK,UAAQ,GAAG,IAAI;IAKlC,IAAI,IAAI,IAAI;CA2CZ"}
|
|
@@ -1899,6 +1899,11 @@ export class InteractiveMode {
|
|
|
1899
1899
|
const text = (this.editor.getExpandedText?.() ?? this.editor.getText()).trim();
|
|
1900
1900
|
if (!text)
|
|
1901
1901
|
return;
|
|
1902
|
+
if (text.startsWith("/") && !this.isKnownSlashCommand(text)) {
|
|
1903
|
+
const command = text.split(/\s/)[0];
|
|
1904
|
+
this.showError(`Unknown command: ${command}. Use slash autocomplete to see available commands.`);
|
|
1905
|
+
return;
|
|
1906
|
+
}
|
|
1902
1907
|
// Queue input during compaction (extension commands execute immediately)
|
|
1903
1908
|
if (this.session.isCompacting) {
|
|
1904
1909
|
if (this.isExtensionCommand(text)) {
|
|
@@ -2149,6 +2154,11 @@ export class InteractiveMode {
|
|
|
2149
2154
|
return allQueued.length;
|
|
2150
2155
|
}
|
|
2151
2156
|
queueCompactionMessage(text, mode) {
|
|
2157
|
+
if (text.startsWith("/") && !this.isKnownSlashCommand(text)) {
|
|
2158
|
+
const command = text.split(/\s/)[0];
|
|
2159
|
+
this.showError(`Unknown command: ${command}. Use slash autocomplete to see available commands.`);
|
|
2160
|
+
return;
|
|
2161
|
+
}
|
|
2152
2162
|
this.compactionQueuedMessages.push({ text, mode });
|
|
2153
2163
|
this.editor.addToHistory?.(text);
|
|
2154
2164
|
this.editor.setText("");
|
|
@@ -2165,6 +2175,26 @@ export class InteractiveMode {
|
|
|
2165
2175
|
const commandName = spaceIndex === -1 ? text.slice(1) : text.slice(1, spaceIndex);
|
|
2166
2176
|
return !!extensionRunner.getCommand(commandName);
|
|
2167
2177
|
}
|
|
2178
|
+
isKnownSlashCommand(text) {
|
|
2179
|
+
if (!text.startsWith("/"))
|
|
2180
|
+
return false;
|
|
2181
|
+
const spaceIndex = text.indexOf(" ");
|
|
2182
|
+
const commandName = spaceIndex === -1 ? text.slice(1) : text.slice(1, spaceIndex);
|
|
2183
|
+
if (BUILTIN_SLASH_COMMANDS.some((command) => command.name === commandName)) {
|
|
2184
|
+
return true;
|
|
2185
|
+
}
|
|
2186
|
+
if (this.isExtensionCommand(text)) {
|
|
2187
|
+
return true;
|
|
2188
|
+
}
|
|
2189
|
+
if (this.session.promptTemplates.some((template) => template.name === commandName)) {
|
|
2190
|
+
return true;
|
|
2191
|
+
}
|
|
2192
|
+
if (commandName.startsWith("skill:") && this.settingsManager.getEnableSkillCommands()) {
|
|
2193
|
+
const skillName = commandName.slice("skill:".length);
|
|
2194
|
+
return this.session.resourceLoader.getSkills().skills.some((skill) => skill.name === skillName);
|
|
2195
|
+
}
|
|
2196
|
+
return false;
|
|
2197
|
+
}
|
|
2168
2198
|
async flushCompactionQueue(options) {
|
|
2169
2199
|
if (this.compactionQueuedMessages.length === 0) {
|
|
2170
2200
|
return;
|