mirror of
https://github.com/Palm1r/QodeAssist.git
synced 2026-03-31 01:42:56 -04:00
refactor: Combine bool functions with capabilities to flag
This commit is contained in:
@ -369,7 +369,7 @@ TEST_F(DocumentContextReaderTest, testPrepareContext)
|
||||
|
||||
EXPECT_EQ(
|
||||
reader.prepareContext(2, 3, *createSettingsForWholeFile()),
|
||||
(ContextData{
|
||||
(QodeAssist::PluginLLMCore::ContextData{
|
||||
.prefix = "Line 0\nLine 1\nLin",
|
||||
.suffix = "e 2\nLine 3\nLine 4",
|
||||
.fileContext = "\n Language: (MIME: text/python) filepath: /path/to/file()\n\n"
|
||||
@ -377,7 +377,7 @@ TEST_F(DocumentContextReaderTest, testPrepareContext)
|
||||
|
||||
EXPECT_EQ(
|
||||
reader.prepareContext(2, 3, *createSettingsForLines(1, 1)),
|
||||
(ContextData{
|
||||
(QodeAssist::PluginLLMCore::ContextData{
|
||||
.prefix = "Line 1\nLin",
|
||||
.suffix = "e 2\nLine 3",
|
||||
.fileContext = "\n Language: (MIME: text/python) filepath: /path/to/file()\n\n"
|
||||
@ -385,7 +385,7 @@ TEST_F(DocumentContextReaderTest, testPrepareContext)
|
||||
|
||||
EXPECT_EQ(
|
||||
reader.prepareContext(2, 3, *createSettingsForLines(2, 2)),
|
||||
(ContextData{
|
||||
(QodeAssist::PluginLLMCore::ContextData{
|
||||
.prefix = "Line 0\nLine 1\nLin",
|
||||
.suffix = "e 2\nLine 3\nLine 4",
|
||||
.fileContext = "\n Language: (MIME: text/python) filepath: /path/to/file()\n\n"
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
#include <llmcore/ContextData.hpp>
|
||||
#include <pluginllmcore/ContextData.hpp>
|
||||
#include <QString>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
@ -61,14 +61,14 @@ std::ostream &operator<<(std::ostream &out, const std::optional<T> &value)
|
||||
|
||||
namespace QodeAssist::LLMCore {
|
||||
|
||||
inline std::ostream &operator<<(std::ostream &out, const Message &value)
|
||||
inline std::ostream &operator<<(std::ostream &out, const PluginLLMCore::Message &value)
|
||||
{
|
||||
out << "Message{"
|
||||
<< "role=" << value.role << "content=" << value.content << "}";
|
||||
return out;
|
||||
}
|
||||
|
||||
inline std::ostream &operator<<(std::ostream &out, const ContextData &value)
|
||||
inline std::ostream &operator<<(std::ostream &out, const PluginLLMCore::ContextData &value)
|
||||
{
|
||||
out << "ContextData{"
|
||||
<< "\n systemPrompt=" << value.systemPrompt << "\n prefix=" << value.prefix
|
||||
|
||||
Reference in New Issue
Block a user