Skip to content

Commit

Permalink
removed redundant code
Browse files Browse the repository at this point in the history
  • Loading branch information
amitjoshi committed Oct 4, 2023
1 parent 4317781 commit fd28310
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 31 deletions.
2 changes: 0 additions & 2 deletions src/common/copilot/PowerPagesCopilot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@ import { v4 as uuidv4 } from 'uuid'
import { PacWrapper } from "../../client/pac/PacWrapper";
import { ITelemetry } from "../../client/telemetry/ITelemetry";
import { AUTH_CREATE_FAILED, AUTH_CREATE_MESSAGE, AuthProfileNotFound, COPILOT_UNAVAILABLE, CopilotDisclaimer, CopilotStylePathSegments, DataverseEntityNameMap, EntityFieldMap, FieldTypeMap, PAC_SUCCESS, SELECTED_CODE_INFO_ENABLED, WebViewMessage, sendIconSvg } from "./constants";
import { AUTH_CREATE_FAILED, AUTH_CREATE_MESSAGE, AuthProfileNotFound, COPILOT_UNAVAILABLE, CopilotDisclaimer, CopilotStylePathSegments, DataverseEntityNameMap, EntityFieldMap, FieldTypeMap, PAC_SUCCESS, SELECTED_CODE_INFO_ENABLED, WebViewMessage, sendIconSvg } from "./constants";
import { IActiveFileParams, IActiveFileData, IOrgInfo } from './model';
import { escapeDollarSign, getLastThreePartsOfFileName, getNonce, getSelectedCode, getSelectedCodeLineRange, getUserName, openWalkthrough, showConnectedOrgMessage, showInputBoxAndGetOrgUrl, showProgressWithNotification } from "../Utils";
import { escapeDollarSign, getLastThreePartsOfFileName, getNonce, getSelectedCode, getSelectedCodeLineRange, getUserName, openWalkthrough, showConnectedOrgMessage, showInputBoxAndGetOrgUrl, showProgressWithNotification } from "../Utils";
import { CESUserFeedback } from "./user-feedback/CESSurvey";
import { GetAuthProfileWatchPattern } from "../../client/lib/AuthPanelView";
import { ActiveOrgOutput } from "../../client/pac/PacTypes";
Expand Down
29 changes: 0 additions & 29 deletions src/common/copilot/assets/scripts/copilot.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,35 +114,6 @@
return lines.length;
}

// function formatCodeBlocks(responseText) {
// const blocks = responseText.split("```");
// const resultDiv = document.createElement("div");

// for (let i = 0; i < blocks.length; i++) {
// if (i % 2 === 0) {
// // Handle text blocks
// const textDiv = document.createElement("div");
// textDiv.innerText = blocks[i];
// resultDiv.appendChild(textDiv);
// } else {
// // Handle code blocks
// const codeDiv = document.createElement("div");
// codeDiv.classList.add("code-division");
// codeDiv.appendChild(createActionWrapper(blocks[i]));

// const preFormatted = document.createElement("pre");
// const codeSnip = document.createElement("code");
// codeSnip.innerText = blocks[i];
// preFormatted.appendChild(codeSnip);

// codeDiv.appendChild(preFormatted);
// resultDiv.appendChild(codeDiv);
// }
// }
// resultDiv.classList.add("result-div");
// return resultDiv;
// }

function createActionWrapper(code) {
const actionWrapper = document.createElement("div");
actionWrapper.classList.add("action-wrapper");
Expand Down

0 comments on commit fd28310

Please sign in to comment.