File tree Expand file tree Collapse file tree 4 files changed +34
-28
lines changed
Expand file tree Collapse file tree 4 files changed +34
-28
lines changed Original file line number Diff line number Diff line change 107107 <DCC_RemoteDebug>false</DCC_RemoteDebug>
108108 <VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
109109 <VerInfo_Locale>1033</VerInfo_Locale>
110+ <Debugger_HostApplication>C:\Program Files (x86)\Embarcadero\Studio\20.0\bin\bds.exe</Debugger_HostApplication>
110111 </PropertyGroup>
111112 <PropertyGroup Condition="'$(Cfg_2)'!=''">
112113 <DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
Original file line number Diff line number Diff line change @@ -138,7 +138,7 @@ object DelphiCopilotChatView: TDelphiCopilotChatView
138138 Left = 0
139139 Top = 3
140140 Width = 56
141- Height = 13
141+ Height = 20
142142 Cursor = crHandPoint
143143 Hint = ' AI being used'
144144 Margins.Left = 0
@@ -149,6 +149,7 @@ object DelphiCopilotChatView: TDelphiCopilotChatView
149149 Caption = ' lbCurrentAI'
150150 PopupMenu = pMenuCurrentAI
151151 OnClick = lbCurrentAIClick
152+ ExplicitHeight = 13
152153 end
153154 object btnSend: TButton
154155 AlignWithMargins = True
Original file line number Diff line number Diff line change @@ -212,9 +212,15 @@ class function TUtilsOTA.EditorAsString(AIOTAModule: IOTAModule): string;
212212 LRead: Integer;
213213 LPosition: Integer;
214214 LStrBuffer: AnsiString;
215+ LOTASourceEditor: IOTASourceEditor;
215216begin
216217 Result := ' ' ;
217- LIOTAEditReader := Self.GetIOTASourceEditor(AIOTAModule).CreateReader;
218+
219+ LOTASourceEditor := Self.GetIOTASourceEditor(AIOTAModule);
220+ if LOTASourceEditor = nil then
221+ TUtils.ShowMsgSynchronize(' Unable to get SourceEditor.' );
222+
223+ LIOTAEditReader := LOTASourceEditor.CreateReader;
218224 try
219225 LPosition := 0 ;
220226 repeat
Original file line number Diff line number Diff line change @@ -264,47 +264,45 @@ class function TUtils.ConfReturnAI(const AValue: string): string;
264264
265265class function TUtils.ProcessTextForEditor (const AText: string): string;
266266var
267- AdjustRet : Boolean;
268- Strings : TStrings;
267+ LAdjustRet : Boolean;
268+ LStrings : TStrings;
269269 I: Integer;
270- SpcCount : Integer;
271- c : Char;
272- s : string;
270+ LCount : Integer;
271+ LChar : Char;
272+ LStrLine : string;
273273begin
274- AdjustRet := CopyReverse(AText, 1 , 2 ) = #13 #10 ;
275- Strings := TStringList.Create;
274+ LAdjustRet := CopyReverse(AText, 1 , 2 ) = #13 #10 ;
275+ LStrings := TStringList.Create;
276276 try
277- Strings .Text := AText;
277+ LStrings .Text := AText;
278278 // SpcCount := 0;
279- for I := 0 to Pred(Strings .Count) do
279+ for I := 0 to Pred(LStrings .Count) do
280280 begin
281- s := Strings [I];
282- if Length(s ) > 2 then
281+ LStrLine := LStrings [I];
282+ if Length(LStrLine ) > 2 then
283283 begin
284- if s [2 ] = ' ' then
284+ if LStrLine [2 ] = ' ' then
285285 begin
286- c := s [1 ];
287- s [1 ] := ' ' ;
288- SpcCount := 0 ;
289- while (SpcCount < Length(s )) and (s[SpcCount + 2 ] = ' ' ) do
290- Inc(SpcCount );
291- s[SpcCount + 1 ] := c ;
292-
293- Strings [I] := s ;
286+ LChar := LStrLine [1 ];
287+ LStrLine [1 ] := ' ' ;
288+ LCount := 0 ;
289+ while (LCount < Length(LStrLine )) and (LStrLine[LCount + 2 ] = ' ' ) do
290+ Inc(LCount );
291+ LStrLine[LCount + 1 ] := LChar ;
292+
293+ LStrings [I] := LStrLine ;
294294 end
295295 else
296- begin
297- Strings[I] := s;
298- end ;
296+ LStrings[I] := LStrLine;
299297 end ;
300298 end ;
301- Result := Strings .Text;
299+ Result := LStrings .Text;
302300 Delete(Result, Pred(Result.Length), 2 );
303301 finally
304- Strings .Free;
302+ LStrings .Free;
305303 end ;
306304
307- if AdjustRet then
305+ if LAdjustRet then
308306 Result := Result + #13 #10 ;
309307end ;
310308
You can’t perform that action at this time.
0 commit comments