Skip to content

Commit e79890e

Browse files
committed
use cross platform path string
1 parent 902e615 commit e79890e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/core/src/codewhispererChat/controllers/chat/telemetryHelper.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
33
* SPDX-License-Identifier: Apache-2.0
44
*/
5+
import * as path from 'path'
56
import { UserIntent } from '@amzn/codewhisperer-streaming'
67
import {
78
AmazonqAddMessage,
@@ -147,7 +148,7 @@ export class CWCTelemetryHelper {
147148
}
148149

149150
public getContextType(prompt: AdditionalContextPrompt): string {
150-
if (prompt.relativePath.startsWith('.amazonq/rules')) {
151+
if (prompt.relativePath.startsWith(path.join('.amazonq', 'rules'))) {
151152
return 'rule'
152153
} else if (prompt.filePath.startsWith(getUserPromptsDirectory())) {
153154
return 'prompt'

0 commit comments

Comments
 (0)