You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/aiProviders/copilot/index.ts
+11-5Lines changed: 11 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,7 @@ import {
5
5
findPossibleTables,
6
6
getCurrentSchema,
7
7
getSystemStatus,
8
+
refsToMarkdown,
8
9
}from"../context";
9
10
import{JobManager}from"../../config";
10
11
@@ -89,6 +90,8 @@ export function activateChat(context: vscode.ExtensionContext) {
89
90
request.prompt.split(` `)
90
91
);
91
92
93
+
constmarkdownRefs=refsToMarkdown(refs);
94
+
92
95
messages=[
93
96
vscode.LanguageModelChatMessage.Assistant(
94
97
`You are a an IBM i savant speciallizing in database features in Db2 for i. Your job is to help developers write and debug their SQL along with offering SQL programming advice.`
@@ -118,11 +121,14 @@ export function activateChat(context: vscode.ExtensionContext) {
118
121
}
119
122
120
123
if(Object.keys(refs).length>0){
121
-
messages.push(
122
-
vscode.LanguageModelChatMessage.Assistant(
123
-
`Here are new table references ${JSON.stringify(refs)}`
124
-
),
125
-
);
124
+
for(consttableRefofmarkdownRefs){
125
+
messages.push(
126
+
vscode.LanguageModelChatMessage.Assistant(
127
+
`Here are new table references for ${tableRef.TABLE_NAME} (Schema: ${tableRef.SCHMEA})\nFormat: column_name (column_text) type(length:precision) is_identity is_nullable\n${tableRef.COLUMN_INFO}`
0 commit comments