Size: 1934 bytes.


  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
// cs/apps/trycopilot.ai/protos/ui.proto.hh
#ifndef CS_APPS_TRYCOPILOT_AI_PROTOS_UI_PROTO_HH
#define CS_APPS_TRYCOPILOT_AI_PROTOS_UI_PROTO_HH

#include <string>

#include "cs/net/proto/proto.hh"

namespace cs::apps::trycopilotai::protos {

// UI event payload.
DECLARE_PROTO(UiEvent) {
  // Handler identifier.
  std::string handler_id;
  // Event payload.
  std::string payload;
};

// UI patch payload.
DECLARE_PROTO(UiPatch) {
  // Handler identifier.
  std::string handler_id;
  // Patch payload.
  std::string payload;
  // Patch version.
  int version;
  // Patch handled flag.
  bool handled;
  // Error message text.
  std::string error_message;
};

// Reusable UI patch envelope.
DECLARE_PROTO(UiPatchData) {
  // Handler identifier.
  std::string handler_id;
  // Patch payload.
  std::string payload;
  // Patch version.
  int version;
  // Patch message.
  std::string message;
};

// Code page request.
DECLARE_PROTO(GetCodePageRequest) {
  // Format identifier.
  std::string fmt;
};

// UI field entry.
DECLARE_PROTO(UiField) {
  // Field name.
  std::string name;
  // Field value.
  std::string value;
};

// UI form payload.
DECLARE_PROTO(UiFormPayload) {
  // Handler identifier.
  std::string handler_id;
  // Form fields.
  std::vector<UiField> fields;
};

// UI document field.
DECLARE_PROTO(UiDocField) {
  // Field name.
  std::string name;
  // Field value.
  std::string value;
};

// UI document payload.
DECLARE_PROTO(UiDoc) {
  // Document UUID.
  std::string uuid;
  // Document fields.
  std::vector<UiDocField> fields;
  // Document message.
  std::string message;
  // Document version.
  int version;
};

// UI doc request.
DECLARE_PROTO(UiDocRequest) {
  // Handler identifier.
  std::string handler_id;
};

// UI doc response.
DECLARE_PROTO(UiDocResponse) {
  // Document payload.
  UiDoc doc;
};

}  // namespace cs::apps::trycopilotai::protos

#endif  // CS_APPS_TRYCOPILOT_AI_PROTOS_UI_PROTO_HH
v0 (commit) © 2025 @p13i.io | Load balancer proxied to: cs-code-viewer-3:8080 in 4ms.