Skip to content

Commit 2c14405

Browse files
Lightning00BladeDevtools-frontend LUCI CQ
authored andcommitted
Fix typos in AI Assistance panel
Bug: none Change-Id: Iab6d98100e40e7401751a603bbd4795ff6307f8e Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6157256 Reviewed-by: Alex Rudenko <alexrudenko@chromium.org> Commit-Queue: Nikolay Vitkov <nvitkov@chromium.org> Auto-Submit: Nikolay Vitkov <nvitkov@chromium.org> Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
1 parent c689358 commit 2c14405

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

front_end/panels/ai_assistance/ExtensionScope.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ const functions = `async function setElementStyles(el, styles) {
210210
211211
// Remove inline styles with the same keys so that the edit applies.
212212
for (const [key, value] of Object.entries(styles)) {
213-
// if it's kebap case.
213+
// if it's kebab case.
214214
el.style.removeProperty(key);
215215
// If it's camel case.
216216
el.style[key] = '';

front_end/panels/ai_assistance/agents/AiAgent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ export abstract class ConversationContext<T> {
149149

150150
/**
151151
* This method is called at the start of `AiAgent.run`.
152-
* It will be overriden in subclasses to fetch data related to the context item.
152+
* It will be overridden in subclasses to fetch data related to the context item.
153153
*/
154154
async refresh(): Promise<void> {
155155
return;

front_end/panels/ai_assistance/agents/NetworkAgent.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -384,11 +384,11 @@ export function formatRequestInitiatorChain(request: SDK.NetworkRequest.NetworkR
384384
let lineStart = '- URL: ';
385385
const initiators = Logs.NetworkLog.NetworkLog.instance().initiatorGraphForRequest(request).initiators;
386386

387-
for (const initator of Array.from(initiators).reverse()) {
388-
initiatorChain = initiatorChain + lineStart + formatInitiatorUrl(initator.url(), allowedOrigin) + '\n';
387+
for (const initiator of Array.from(initiators).reverse()) {
388+
initiatorChain = initiatorChain + lineStart + formatInitiatorUrl(initiator.url(), allowedOrigin) + '\n';
389389
lineStart = '\t' + lineStart;
390-
if (initator === request) {
391-
initiatorChain = formatRequestInitiated(initator, initiatorChain, lineStart, allowedOrigin);
390+
if (initiator === request) {
391+
initiatorChain = formatRequestInitiated(initiator, initiatorChain, lineStart, allowedOrigin);
392392
break;
393393
}
394394
}

front_end/panels/ai_assistance/agents/PatchAgent.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import {
2626
const preamble = `You are responsible for changing the source code on behalf of the user.
2727
The user query defines what changes are to be made.
2828
You have a number of functions to get information about source files in the project.
29-
Use those functions to fullful the user query.
29+
Use those functions to fulfill the user query.
3030
3131
## Step-by-step instructions
3232
@@ -149,7 +149,7 @@ export class PatchAgent extends AiAgent<Workspace.Workspace.Project> {
149149
properties: {
150150
filepath: {
151151
type: Host.AidaClient.ParametersTypes.STRING,
152-
description: 'A file path that idenfities the file to get the content for',
152+
description: 'A file path that identifies the file to get the content for',
153153
nullable: false,
154154
},
155155
},
@@ -194,7 +194,7 @@ export class PatchAgent extends AiAgent<Workspace.Workspace.Project> {
194194
properties: {
195195
filepath: {
196196
type: Host.AidaClient.ParametersTypes.STRING,
197-
description: 'A file path that idenfities the file',
197+
description: 'A file path that identifies the file',
198198
nullable: false,
199199
},
200200
content: {
@@ -219,7 +219,7 @@ export class PatchAgent extends AiAgent<Workspace.Workspace.Project> {
219219
};
220220
}
221221
const content = params.content;
222-
// TODO: we unespace some characters to restore the original
222+
// TODO: we unescape some characters to restore the original
223223
// content but this should be fixed upstream.
224224
uiSourceCode.setContent(
225225
content.replaceAll('\\n', '\n').replaceAll('\\"', '"').replaceAll('\\\'', '\''),
@@ -277,14 +277,14 @@ export class PatchAgent extends AiAgent<Workspace.Workspace.Project> {
277277
return [...this.#history];
278278
}
279279

280-
override async * run(initalQuery: string, options: {
280+
override async * run(initialQuery: string, options: {
281281
signal?: AbortSignal, selected: ConversationContext<Workspace.Workspace.Project>|null,
282282
}): AsyncGenerator<ResponseData, void, void> {
283283
await options.selected?.refresh();
284284

285285
this.#project = options.selected ?? undefined;
286286

287-
let query: Host.AidaClient.Part = {text: initalQuery};
287+
let query: Host.AidaClient.Part = {text: initialQuery};
288288

289289
// Request is built here to capture history up to this point.
290290
let request = this.buildRequest(query);

front_end/panels/ai_assistance/components/ChatView.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ export class ChatView extends HTMLElement {
561561
}
562562

563563
if (ev.key === 'Enter' && !ev.shiftKey) {
564-
// Do not go to a new line whenver Shift + Enter is pressed.
564+
// Do not go to a new line whenever Shift + Enter is pressed.
565565
ev.preventDefault();
566566
// Only submit the text when there isn't a request already in flight.
567567
if (!this.#props.isLoading) {

0 commit comments

Comments
 (0)