Skip to content

Commit

Permalink
Send the proper message, and it works...
Browse files Browse the repository at this point in the history
Turns out was sending an object when it just wants a string.
Still need to figure out what string to get... I think this would make sense to be done like vscode-powershell.
  • Loading branch information
corbob committed Jul 10, 2019
1 parent a695266 commit bf45a11
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
6 changes: 2 additions & 4 deletions src/client/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { fileURLToPath, sleep } from './utils'
import { getDefaultPowerShellPath, getPlatformDetails } from './platform';
import settings = require("./settings");
import * as process from './process';
import { EvaluateRequestMessage, IEvaluateRequestArguments, GetHelpRequestMessage, IGetHelpRequestArguments } from "./messages";
import { EvaluateRequestMessage, IEvaluateRequestArguments, GetHelpRequestMessage } from "./messages";

async function getCurrentSelection(mode: string) {
let doc = await workspace.document
Expand Down Expand Up @@ -97,9 +97,7 @@ function startREPLProc(context: ExtensionContext, config: settings.ISettings, pw
let cmdEvalLine = commands.registerCommand("powershell.evaluateLine", async () => doEval('n'));
let cmdEvalSelection = commands.registerCommand("powershell.evaluateSelection", async () => doEval('v'));
let cmdGetHelp = commands.registerCommand("powershell.getHelp", async () => {
const getHelpArgs: IGetHelpRequestArguments = {
expression: 'Get-Command',
}
const getHelpArgs: string = 'test'
client.sendRequest(GetHelpRequestMessage, getHelpArgs)
await proc.scrollToBottom()
});
Expand Down
3 changes: 0 additions & 3 deletions src/client/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,3 @@ export interface IEvaluateRequestArguments {
expression: string;
}
export const GetHelpRequestMessage = "powerShell/showHelp";
export interface IGetHelpRequestArguments {
expression: string;
}

0 comments on commit bf45a11

Please sign in to comment.