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
2 changes: 1 addition & 1 deletion Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
<PackageReference Update="SkiaSharp" Version="2.88.6" />
<PackageReference Update="SkiaSharp.NativeAssets.Linux.NoDependencies" Version="2.88.6" Condition="$([MSBuild]::IsOsPlatform('Linux'))" />
<PackageReference Update="TextCopy" Version="6.2.1" />
<PackageReference Update="Microsoft.SemanticKernel" Version="1.70.0" />
<PackageReference Update="Microsoft.SemanticKernel" Version="1.71.0" />

<PackageReference Update="OpenAI" Version="2.8.0" />
<PackageReference Update="System.ClientModel" Version="1.8.1" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -709,12 +709,8 @@ public async Task DoHandleRebuildIntellisenseNotification(RebuildIntelliSensePar
{
Logger.Verbose("HandleRebuildIntelliSenseNotification");

// This URI doesn't come in escaped - so if it's a file path with reserved characters (such as %)
// then we'll fail to find it since GetFile expects the URI to be a fully-escaped URI as that's
// what the document events are sent in as.
var escapedOwnerUri = Uri.EscapeDataString(rebuildParams.OwnerUri);
// Skip closing this file if the file doesn't exist
var scriptFile = this.CurrentWorkspace.GetFile(escapedOwnerUri);
var scriptFile = this.CurrentWorkspace.GetFile(rebuildParams.OwnerUri);
if (scriptFile == null)
{
return;
Expand Down Expand Up @@ -1070,10 +1066,7 @@ internal async Task PrepopulateCommonMetadata(
{
if (scriptInfo.IsConnected)
{
// This URI doesn't come in escaped - so if it's a file path with reserved characters (such as %)
// then we'll fail to find it since GetFile expects the URI to be a fully-escaped URI as that's
// what the document events are sent in as.
var fileUri = Uri.EscapeUriString(info.OwnerUri);
var fileUri = info.OwnerUri;
var scriptFile = CurrentWorkspace.GetFile(fileUri);
if (scriptFile == null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,7 @@ internal async Task HandleConvertNotebookToSqlRequest(ConvertNotebookToSqlParams

internal async Task HandleConvertSqlToNotebookRequest(ConvertSqlToNotebookParams parameters, RequestContext<ConvertSqlToNotebookResult> requestContext)
{
// This URI doesn't come in escaped - so if it's a file path with reserved characters (such as %)
// then we'll fail to find it since GetFile expects the URI to be a fully-escaped URI as that's
// what the document events are sent in as.
var escapedClientUri = Uri.EscapeUriString(parameters.ClientUri);
var file = WorkspaceService<SqlToolsSettings>.Instance.Workspace.GetFile(escapedClientUri);
var file = WorkspaceService<SqlToolsSettings>.Instance.Workspace.GetFile(parameters.ClientUri);
// Temporary notebook that we just fill in with the sql until the parsing logic is added
var result = new ConvertSqlToNotebookResult
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1582,20 +1582,16 @@ private async Task SaveResultsHelper(SaveResultsRequestParams saveParams,
// Internal for testing purposes
internal string GetSqlText(ExecuteRequestParamsBase request)
{
// This URI doesn't come in escaped - so if it's a file path with reserved characters (such as %)
// then we'll fail to find it since GetFile expects the URI to be a fully-escaped URI as that's
// what the document events are sent in as.
var escapedOwnerUri = Uri.EscapeUriString(request.OwnerUri);
// If it is a document selection, we'll retrieve the text from the document
if (request is ExecuteDocumentSelectionParams docRequest)
{
return GetSqlTextFromSelectionData(escapedOwnerUri, docRequest.QuerySelection);
return GetSqlTextFromSelectionData(request.OwnerUri, docRequest.QuerySelection);
}

// If it is a document statement, we'll retrieve the text from the document
if (request is ExecuteDocumentStatementParams stmtRequest)
{
return GetSqlStatementAtPosition(escapedOwnerUri, stmtRequest.Line, stmtRequest.Column);
return GetSqlStatementAtPosition(request.OwnerUri, stmtRequest.Line, stmtRequest.Column);
}

// If it is an ExecuteStringParams, return the text as is
Expand Down
Loading