nolo-cli 0.1.6 → 0.1.7
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/README.md +1 -0
- package/package.json +1 -1
- package/tui/session.ts +24 -0
package/README.md
CHANGED
package/package.json
CHANGED
package/tui/session.ts
CHANGED
|
@@ -117,6 +117,7 @@ export function renderTuiHelp() {
|
|
|
117
117
|
"Commands:",
|
|
118
118
|
" /help Show this help",
|
|
119
119
|
" /new Start a fresh dialog",
|
|
120
|
+
" /context Show workspace context and next actions",
|
|
120
121
|
" /agent Show the current agent",
|
|
121
122
|
" /agents List built-in agent shortcuts",
|
|
122
123
|
" /switch <agent> Switch the current agent",
|
|
@@ -133,6 +134,26 @@ export function renderTuiHelp() {
|
|
|
133
134
|
].join("\n");
|
|
134
135
|
}
|
|
135
136
|
|
|
137
|
+
export function renderContextPanel(state: TuiState) {
|
|
138
|
+
const docs = state.attachedDocs.length
|
|
139
|
+
? state.attachedDocs.join(", ")
|
|
140
|
+
: "none";
|
|
141
|
+
return [
|
|
142
|
+
"Workspace context",
|
|
143
|
+
"-----------------",
|
|
144
|
+
`agent ${state.agentName}`,
|
|
145
|
+
`dialog ${resolveDialogLabel(state)}`,
|
|
146
|
+
`docs ${docs}`,
|
|
147
|
+
`profile ${state.profileName}`,
|
|
148
|
+
`server ${state.serverUrl}`,
|
|
149
|
+
"",
|
|
150
|
+
"Next:",
|
|
151
|
+
" /agents see specialist shortcuts",
|
|
152
|
+
" /doc attach <doc> add working context",
|
|
153
|
+
" /new start a clean dialog",
|
|
154
|
+
].join("\n");
|
|
155
|
+
}
|
|
156
|
+
|
|
136
157
|
export function renderKnownAgents() {
|
|
137
158
|
return [
|
|
138
159
|
"Agents:",
|
|
@@ -184,6 +205,9 @@ export function handleTuiInput(input: string, state: TuiState): TuiInputResult {
|
|
|
184
205
|
switch (command) {
|
|
185
206
|
case "/help":
|
|
186
207
|
return { nextState: state, output: renderTuiHelp() };
|
|
208
|
+
case "/context":
|
|
209
|
+
case "/ctx":
|
|
210
|
+
return { nextState: state, output: renderContextPanel(state) };
|
|
187
211
|
case "/exit":
|
|
188
212
|
case "/quit":
|
|
189
213
|
return { nextState: state, output: "Bye.", action: { type: "exit" } };
|