Files
tsl-devkit/lsp-server/src/protocol/window/progress.cppm
T
2025-12-07 23:07:03 +08:00

78 lines
1.4 KiB
C++

module;
export module lsp.protocol.window.progress;
import std;
import lsp.protocol.common.basic_types;
export namespace lsp::protocol
{
struct WorkDoneProgressBegin
{
string kind = "begin";
string title;
boolean cancellable;
std::optional<string> message;
uinteger percentage;
};
struct WorkDoneProgressReport
{
string kind = "report";
boolean cancellable;
std::optional<string> message;
uinteger percentage;
};
struct WorkDoneProgressEnd
{
string kind = "end";
string message;
};
struct WorkDoneProgressParams
{
ProgressToken workDoneToken;
};
struct WorkDoneProgressOptions
{
std::optional<boolean> workDoneProgress;
};
struct PartialResultParams
{
ProgressToken partialResultToken;
};
struct WorkDoneProgressCreateParams
{
ProgressToken token;
};
struct WorkDoneProgressCancelParams
{
ProgressToken token;
};
using TraceValue = std::string_view;
namespace TraceValueLiterals
{
inline constexpr TraceValue Off = "off";
inline constexpr TraceValue Messages = "messages";
inline constexpr TraceValue Verbose = "verbose";
}
struct SetTraceParams
{
TraceValue value;
};
struct LogTraceParams
{
string message;
std::optional<string> verbose;
};
}