Skip to content

Commit b95b470

Browse files
olimorriscleong14
authored andcommitted
fix(inline): ensure placement is in lower case (olimorris#949)
Co-authored-by: Oli Morris <olimorris@users.noreply.github.com>
1 parent 7d41a02 commit b95b470

File tree

1 file changed

+2
-2
lines changed
  • lua/codecompanion/strategies/inline

1 file changed

+2
-2
lines changed

lua/codecompanion/strategies/inline/init.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -434,12 +434,12 @@ function Inline:done(output)
434434
log:error("[%s] %s", adapter_name, xml.error)
435435
return self:reset()
436436
end
437-
if xml and not xml.code and xml.placement ~= "chat" then
437+
if xml and not xml.code and string.lower(xml.placement) ~= "chat" then
438438
log:error("[%s] Returned no code", adapter_name)
439439
return self:reset()
440440
end
441441

442-
local placement = xml and xml.placement or self.classification.placement
442+
local placement = xml and string.lower(xml.placement) or string.lower(self.classification.placement)
443443
log:debug("[Inline] Placement: %s", placement)
444444
if not placement then
445445
log:error("[%s] No placement returned", adapter_name)

0 commit comments

Comments
 (0)