Skip to content

Commit e8acb97

Browse files
committed
Showing log folder for AI
1 parent f2bc768 commit e8acb97

File tree

4 files changed

+91
-20
lines changed

4 files changed

+91
-20
lines changed

FetchXmlBuilder/Forms/Settings.Designer.cs

Lines changed: 66 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

FetchXmlBuilder/Forms/Settings.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
using Rappen.XTB.Helpers;
99
using System.Collections.Generic;
1010
using Rappen.XTB.FetchXmlBuilder.DockControls;
11+
using XrmToolBox.Extensibility;
12+
using System.IO;
13+
using System.Diagnostics;
1114

1215
namespace Rappen.XTB.FetchXmlBuilder.Forms
1316
{
@@ -93,6 +96,7 @@ private void PopulateSettings(FXBSettings settings)
9396
txtAiApiKey.Text = settings.AiSettings.ApiKey;
9497
txtAiCallMe.Text = settings.AiSettings.MyName;
9598
chkAiLogConversation.Checked = settings.AiSettings.LogConversation;
99+
linkAiLogFolder.Text = Path.Combine(Paths.LogsPath, "FXB AI Chat");
96100
cmbAiSupplier_SelectedIndexChanged();
97101
}
98102

@@ -376,5 +380,10 @@ private void chkWorkWithLayout_CheckedChanged(object sender, EventArgs e)
376380
{
377381
panLayout.Enabled = chkWorkWithLayout.Checked;
378382
}
383+
384+
private void linkLogFolder_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
385+
{
386+
Process.Start("explorer.exe", linkAiLogFolder.Text);
387+
}
379388
}
380389
}

FetchXmlBuilder/Forms/Settings.resx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,21 @@
120120
<metadata name="tt.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
121121
<value>17, 17</value>
122122
</metadata>
123+
<data name="picAiLogFolder.ToolTip" xml:space="preserve">
124+
<value>Every session in the conversation to the AI is stored in this folder.
125+
The conversation is not only what you can see in the UI, but also
126+
internal messages back and forth, e.g. the metadata that the AI
127+
may need.
128+
This logging is not used by the tool, you may clean the folder
129+
whenever you want to, this is just to give you the opportunity to
130+
learn even more, to see what the AI is asking the tool about.</value>
131+
</data>
132+
<data name="chkAiLogConversation.ToolTip" xml:space="preserve">
133+
<value>Accepting this makes it possible to log your conversation to and from the AI.
134+
The reason is mostly to be able to debug strange resposes, to hopefully
135+
improve the feature.
136+
This log is stored in Azure Application Insights.</value>
137+
</data>
123138
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
124139
<data name="btnResetXmlColors.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
125140
<value>

0 commit comments

Comments
 (0)