Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/cyan-knives-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"kilo-code": patch
---

adds the /session show command
16 changes: 16 additions & 0 deletions src/core/webview/webviewMessageHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3843,6 +3843,22 @@ export const webviewMessageHandler = async (
}
break
}
case "sessionShow": {
try {
const sessionService = SessionManager.init()

if (!sessionService.sessionId) {
vscode.window.showErrorMessage("No active session. Start a new task to create a session.")
break
}

vscode.window.showInformationMessage(`Session ID: ${sessionService.sessionId}`)
} catch (error) {
const errorMessage = error instanceof Error ? error.message : String(error)
vscode.window.showErrorMessage(`Failed to copy session ID: ${errorMessage}`)
}
break
}
case "sessionShare": {
try {
const sessionService = SessionManager.init()
Expand Down
1 change: 1 addition & 0 deletions src/shared/WebviewMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ export interface WebviewMessage {
| "sessionShare" // kilocode_change
| "shareTaskSession" // kilocode_change
| "sessionFork" // kilocode_change
| "sessionShow" // kilocode_change
| "singleCompletion" // kilocode_change
text?: string
completionRequestId?: string // kilocode_change
Expand Down
10 changes: 9 additions & 1 deletion webview-ui/src/components/chat/ChatTextArea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,15 @@ interface ChatTextAreaProps {

// kilocode_change start
function handleSessionCommand(trimmedInput: string, setInputValue: (value: string) => void) {
if (trimmedInput.startsWith("/session share")) {
if (trimmedInput.startsWith("/session show")) {
vscode.postMessage({
type: "sessionShow",
})

setInputValue("")

return true
} else if (trimmedInput.startsWith("/session share")) {
vscode.postMessage({
type: "sessionShare",
})
Expand Down