mirror of
https://bitbucket.org/siakitem/my-pi.git
synced 2026-08-28 16:45:22 +00:00
feat: add pure ssh2 remote operations
This commit is contained in:
@@ -47,7 +47,7 @@ export function buildToolAskPayload(facts: ToolAskFacts): PromptPayload {
|
||||
executedUnit: check.executedUnit ?? null,
|
||||
},
|
||||
evidence: bash
|
||||
? fullCommandEvidence(facts)
|
||||
? [...fullCommandEvidence(facts), ...invokedShellInputPreviewEvidence(facts)]
|
||||
: inputPreviewEvidence(facts, mcp),
|
||||
annotations: [],
|
||||
};
|
||||
@@ -86,6 +86,14 @@ function fullCommandEvidence(facts: ToolAskFacts): PromptEvidence[] {
|
||||
return [{ label: "full command", text: fullCommand, detail: null }];
|
||||
}
|
||||
|
||||
/** Extra context supplied by the concrete tool that exposes shell semantics. */
|
||||
function invokedShellInputPreviewEvidence(facts: ToolAskFacts): PromptEvidence[] {
|
||||
const invokedToolName = distinctInvokedName(facts);
|
||||
if (invokedToolName === null) return [];
|
||||
const preview = facts.formatter?.formatToolInputForPrompt(invokedToolName, facts.input);
|
||||
return preview ? [{ label: "input", text: preview, detail: null }] : [];
|
||||
}
|
||||
|
||||
/**
|
||||
* The per-tool input preview, when a formatter is registered and produces one.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user