Skip to content

Commit 0270fd5

Browse files
authored
Merge pull request #337 from codefori/fix/list-tables-duplicates
Fix/list tables duplicates
2 parents 3353b66 + c5a5eb2 commit 0270fd5

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/aiProviders/continue/listTablesContextProvider.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import {
1414
getSqlContextItems
1515
} from "../context";
1616
import Configuration from "../../configuration";
17+
import { Db2ContextItems, getContextItems } from "../prompt";
1718

1819
const listDb2Table: ContextProviderDescription = {
1920
title: "list Db2i Tables",
@@ -82,9 +83,9 @@ class ListDb2iTables implements IContextProvider {
8283
}
8384

8485
} else {
85-
const tablesRefs = await getSqlContextItems(extras.fullInput);
86-
for (const table of tablesRefs.items) {
87-
contextItems.push(table);
86+
const tablesRefs = await getContextItems(query);
87+
for (const tableData of tablesRefs.context) {
88+
contextItems.push(tableData);
8889
}
8990
}
9091
return contextItems;

0 commit comments

Comments
 (0)