diff --git a/src/common/copilot/PowerPagesCopilot.ts b/src/common/copilot/PowerPagesCopilot.ts index 52e4c0d8..e558aca7 100644 --- a/src/common/copilot/PowerPagesCopilot.ts +++ b/src/common/copilot/PowerPagesCopilot.ts @@ -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"; diff --git a/src/common/copilot/assets/scripts/copilot.js b/src/common/copilot/assets/scripts/copilot.js index 0f570e40..a86cb669 100644 --- a/src/common/copilot/assets/scripts/copilot.js +++ b/src/common/copilot/assets/scripts/copilot.js @@ -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");