Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
olimorris committed Feb 13, 2025
1 parent 04b72b3 commit 861dc80
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lua/codecompanion/strategies/inline/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ function Inline:submit(prompt)
})
end

---Once the requset has been completed, we can process the output
---Once the request has been completed, we can process the output
---@param output string The output from the LLM
---@return nil
function Inline:done(output)
Expand Down
8 changes: 3 additions & 5 deletions tests/strategies/inline/test_inline.lua
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,9 @@ T["Inline"]["forms correct prompts"] = function()
end

T["Inline"]["generates correct prompt structure"] = function()
-- Capture the submitted prompts
local submitted_prompts = {}

-- Mock the submit function
function inline:submit(prompts)
submitted_prompts = prompts
end
Expand All @@ -147,11 +148,8 @@ T["Inline"]["generates correct prompt structure"] = function()
}
inline:prompt(user_prompt)

-- Should be a system prompt and the user prompt
h.eq(#submitted_prompts, 2)

h.eq(#submitted_prompts, 2) -- Should be a system prompt and the user prompt
h.eq(submitted_prompts[1].role, "system")

h.eq(submitted_prompts[2].role, "user")
h.eq(submitted_prompts[2].content, "<user_prompt>Test prompt</user_prompt>")
end
Expand Down

0 comments on commit 861dc80

Please sign in to comment.