Skip to content

Commit

Permalink
address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
thenamankumar committed Jan 15, 2025
1 parent 74f55ad commit 84614c9
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions vscode/webviews/chat/Transcript.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -308,11 +308,9 @@ const TranscriptInteraction: FC<TranscriptInteractionProps> = memo(props => {
return
}

const { intent, intentScores } = getIntentProps(
editorValue,
intentFromSubmit,
intentResults.current
)
const { intent, intentScores } = intentFromSubmit

Check failure on line 311 in vscode/webviews/chat/Transcript.tsx

View workflow job for this annotation

GitHub Actions / JetBrains tests

Initializer provides no value for this binding element and the binding element has no default value.

Check failure on line 311 in vscode/webviews/chat/Transcript.tsx

View workflow job for this annotation

GitHub Actions / build

Initializer provides no value for this binding element and the binding element has no default value.

Check failure on line 311 in vscode/webviews/chat/Transcript.tsx

View workflow job for this annotation

GitHub Actions / test-unit (ubuntu, 20)

Initializer provides no value for this binding element and the binding element has no default value.

Check failure on line 311 in vscode/webviews/chat/Transcript.tsx

View workflow job for this annotation

GitHub Actions / test-unit (windows, 20)

Initializer provides no value for this binding element and the binding element has no default value.

Check failure on line 311 in vscode/webviews/chat/Transcript.tsx

View workflow job for this annotation

GitHub Actions / test-unit (ubuntu, 18)

Initializer provides no value for this binding element and the binding element has no default value.
? { intent: intentFromSubmit }
: getIntentProps(editorValue, intentResults.current)

const commonProps = {
editorValue,
Expand Down Expand Up @@ -779,15 +777,7 @@ function reevaluateSearchWithSelectedFilters({
})
}

const getIntentProps = (
editorValue: SerializedPromptEditorValue,
intentFromSubmit?: ChatMessage['intent'],
results?: IntentResults | null
) => {
if (intentFromSubmit) {
return { intent: intentFromSubmit, intentScores: undefined }
}

const getIntentProps = (editorValue: SerializedPromptEditorValue, results?: IntentResults | null) => {
const query = inputTextWithMappedContextChipsFromPromptEditorState(editorValue.editorState)

if (query === results?.query) {
Expand Down

0 comments on commit 84614c9

Please sign in to comment.