Skip to content

Commit

Permalink
refactor: better prompting when there is no selected context
Browse files Browse the repository at this point in the history
  • Loading branch information
alan-cho committed Nov 5, 2024
1 parent 205a648 commit 7d91ad3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/views/chatView/utils/ContextUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { ZenmlGlobalConfigResp } from '../../../types/LSClientResponseTypes';
import { PipelineRunDag, DagStep, DagArtifact } from '../../../types/PipelineTypes';
import { JsonObject } from '../../panel/panelView/PanelTreeItem';
import { StackComponentTreeItem } from '../../activityBar';
import axios from 'axios';
import axios, { request } from 'axios';
import * as vscode from 'vscode';
import { getPipelineData } from './PipelineUtils';
import { ComponentDataProvider } from '../../activityBar/componentView/ComponentDataProvider';
Expand All @@ -34,6 +34,10 @@ type ContextType =
| string;

export async function addContext(requestedContext: ContextType[]): Promise<string> {
if (!requestedContext?.length) {
return 'Context:\nNo context given';
}

let systemMessage = 'Context:\n';
for (let context of requestedContext) {
if (context.startsWith('Pipeline Run:')) {
Expand Down

0 comments on commit 7d91ad3

Please sign in to comment.