|
| 1 | +import { MemdbSubEvent, MemoRecord, VecDbStatus } from "../events"; |
| 2 | + |
| 3 | +export const STUB_MEMORIES: MemoRecord[] = [ |
| 4 | + { |
| 5 | + memid: "7666487b81", |
| 6 | + m_type: "proj-fact", |
| 7 | + m_goal: "compile", |
| 8 | + m_project: "proj1", |
| 9 | + m_payload: "Looks like proj1 is written in fact in Rust.", |
| 10 | + m_origin: "local-committed", |
| 11 | + mstat_correct: 1, |
| 12 | + mstat_relevant: -1, |
| 13 | + mstat_times_used: 1, |
| 14 | + }, |
| 15 | + { |
| 16 | + memid: "cdec854819", |
| 17 | + m_type: "seq-of-acts", |
| 18 | + m_goal: "compile", |
| 19 | + m_project: "proj2", |
| 20 | + m_payload: "Wow, running cargo build on proj2 was successful!", |
| 21 | + m_origin: "local-committed", |
| 22 | + mstat_correct: 0, |
| 23 | + mstat_relevant: 0, |
| 24 | + mstat_times_used: 0, |
| 25 | + }, |
| 26 | + { |
| 27 | + memid: "eb1d64684b", |
| 28 | + m_type: "proj-fact", |
| 29 | + m_goal: "compile", |
| 30 | + m_project: "proj2", |
| 31 | + m_payload: "Looks like proj2 is written in fact in Rust.", |
| 32 | + m_origin: "local-committed", |
| 33 | + mstat_correct: 0, |
| 34 | + mstat_relevant: 0, |
| 35 | + mstat_times_used: 0, |
| 36 | + }, |
| 37 | + |
| 38 | + { |
| 39 | + memid: "eb1d64684c", |
| 40 | + m_type: "proj-fact", |
| 41 | + m_goal: |
| 42 | + "Long goal Long goal Long goal Long goal Long goal Long goal Long goal Long goal Long goal Long goal", |
| 43 | + m_project: "proj2", |
| 44 | + m_payload: "Looks like proj2 is written in fact in Rust.", |
| 45 | + m_origin: "local-committed", |
| 46 | + mstat_correct: 0, |
| 47 | + mstat_relevant: 0, |
| 48 | + mstat_times_used: 0, |
| 49 | + }, |
| 50 | +]; |
| 51 | + |
| 52 | +export const STUB_SUB_RESPONSE: MemdbSubEvent[] = [ |
| 53 | + { |
| 54 | + pubevent_id: 19, |
| 55 | + pubevent_action: "INSERT", |
| 56 | + pubevent_json: { |
| 57 | + memid: "66a072d699", |
| 58 | + m_type: "seq-of-acts", |
| 59 | + m_goal: "compile", |
| 60 | + m_project: "proj1", |
| 61 | + m_payload: "Wow, running cargo build on proj1 was successful!", |
| 62 | + m_origin: "local-committed", |
| 63 | + mstat_correct: 0.0, |
| 64 | + mstat_relevant: 0.0, |
| 65 | + mstat_times_used: 0, |
| 66 | + }, |
| 67 | + }, |
| 68 | + { |
| 69 | + pubevent_id: 26, |
| 70 | + pubevent_action: "INSERT", |
| 71 | + pubevent_json: { |
| 72 | + memid: "d688925823", |
| 73 | + m_type: "proj-fact", |
| 74 | + m_goal: "compile", |
| 75 | + m_project: "proj1", |
| 76 | + m_payload: "Looks like proj1 is written in fact in Rust.", |
| 77 | + m_origin: "local-committed", |
| 78 | + mstat_correct: 0.0, |
| 79 | + mstat_relevant: 0.0, |
| 80 | + mstat_times_used: 0, |
| 81 | + }, |
| 82 | + }, |
| 83 | + { |
| 84 | + pubevent_id: 27, |
| 85 | + pubevent_action: "INSERT", |
| 86 | + pubevent_json: { |
| 87 | + memid: "08f9374753", |
| 88 | + m_type: "seq-of-acts", |
| 89 | + m_goal: "compile", |
| 90 | + m_project: "proj2", |
| 91 | + m_payload: "Wow, running cargo build on proj2 was successful!", |
| 92 | + m_origin: "local-committed", |
| 93 | + mstat_correct: 0.0, |
| 94 | + mstat_relevant: 0.0, |
| 95 | + mstat_times_used: 0, |
| 96 | + }, |
| 97 | + }, |
| 98 | + { |
| 99 | + pubevent_id: 28, |
| 100 | + pubevent_action: "INSERT", |
| 101 | + pubevent_json: { |
| 102 | + memid: "c9cefe3ff4", |
| 103 | + m_type: "proj-fact", |
| 104 | + m_goal: "compile", |
| 105 | + m_project: "proj2", |
| 106 | + m_payload: "Looks like proj2 is written in fact in Rust.", |
| 107 | + m_origin: "local-committed", |
| 108 | + mstat_correct: 0.0, |
| 109 | + mstat_relevant: 0.0, |
| 110 | + mstat_times_used: 0, |
| 111 | + }, |
| 112 | + }, |
| 113 | + { |
| 114 | + pubevent_id: 29, |
| 115 | + pubevent_action: "UPDATE", |
| 116 | + pubevent_json: { |
| 117 | + memid: "d688925823", |
| 118 | + m_type: "proj-fact", |
| 119 | + m_goal: "compile", |
| 120 | + m_project: "proj1", |
| 121 | + m_payload: "Looks like proj1 is written in fact in Rust.", |
| 122 | + m_origin: "local-committed", |
| 123 | + mstat_correct: 1.0, |
| 124 | + mstat_relevant: -1.0, |
| 125 | + mstat_times_used: 1, |
| 126 | + }, |
| 127 | + }, |
| 128 | + { |
| 129 | + pubevent_id: 30, |
| 130 | + pubevent_action: "DELETE", |
| 131 | + pubevent_json: { |
| 132 | + memid: "9d2a679b09", |
| 133 | + m_type: "", |
| 134 | + m_goal: "", |
| 135 | + m_project: "", |
| 136 | + m_payload: "", |
| 137 | + m_origin: "", |
| 138 | + mstat_correct: 0, |
| 139 | + mstat_relevant: 0, |
| 140 | + mstat_times_used: 0, |
| 141 | + }, |
| 142 | + }, |
| 143 | +]; |
| 144 | + |
| 145 | +// export const STUB_SUB_RESPONSE_WITH_STATUS: ( |
| 146 | +// | MemdbSubEventUnparsed |
| 147 | +// | VecDbStatus |
| 148 | +// )[] = []; |
| 149 | + |
| 150 | +export const VECDB_STATUS_STARTING: VecDbStatus = { |
| 151 | + files_unprocessed: 0, |
| 152 | + files_total: 0, |
| 153 | + requests_made_since_start: 1, |
| 154 | + vectors_made_since_start: 33, |
| 155 | + db_size: 33, |
| 156 | + db_cache_size: 37, |
| 157 | + state: "starting", |
| 158 | + queue_additions: false, |
| 159 | + vecdb_max_files_hit: false, |
| 160 | + vecdb_errors: {}, |
| 161 | +}; |
| 162 | + |
| 163 | +export const VECDB_STATUS_PARSING: VecDbStatus = { |
| 164 | + files_unprocessed: 377, |
| 165 | + files_total: 404, |
| 166 | + requests_made_since_start: 5, |
| 167 | + vectors_made_since_start: 296, |
| 168 | + db_size: 168, |
| 169 | + db_cache_size: 333, |
| 170 | + state: "parsing", |
| 171 | + queue_additions: false, |
| 172 | + vecdb_max_files_hit: false, |
| 173 | + vecdb_errors: {}, |
| 174 | +}; |
| 175 | + |
| 176 | +export const VECDB_STATUS_PARSING_2: VecDbStatus = { |
| 177 | + files_unprocessed: 372, |
| 178 | + files_total: 404, |
| 179 | + requests_made_since_start: 6, |
| 180 | + vectors_made_since_start: 303, |
| 181 | + db_size: 303, |
| 182 | + db_cache_size: 340, |
| 183 | + state: "parsing", |
| 184 | + queue_additions: false, |
| 185 | + vecdb_max_files_hit: false, |
| 186 | + vecdb_errors: {}, |
| 187 | +}; |
| 188 | + |
| 189 | +export const VECDV_STATUS_PARISING_3: VecDbStatus = { |
| 190 | + files_unprocessed: 192, |
| 191 | + files_total: 404, |
| 192 | + requests_made_since_start: 21, |
| 193 | + vectors_made_since_start: 990, |
| 194 | + db_size: 1021, |
| 195 | + db_cache_size: 1027, |
| 196 | + state: "parsing", |
| 197 | + queue_additions: false, |
| 198 | + vecdb_max_files_hit: false, |
| 199 | + vecdb_errors: {}, |
| 200 | +}; |
| 201 | + |
| 202 | +export const VECDB_STATUS_PARSING_4: VecDbStatus = { |
| 203 | + files_unprocessed: 12, |
| 204 | + files_total: 404, |
| 205 | + requests_made_since_start: 52, |
| 206 | + vectors_made_since_start: 2494, |
| 207 | + db_size: 2524, |
| 208 | + db_cache_size: 2531, |
| 209 | + state: "parsing", |
| 210 | + queue_additions: false, |
| 211 | + vecdb_max_files_hit: false, |
| 212 | + vecdb_errors: {}, |
| 213 | +}; |
| 214 | + |
| 215 | +export const VECDB_STATUS_COOLDOWN: VecDbStatus = { |
| 216 | + files_unprocessed: 1, |
| 217 | + files_total: 404, |
| 218 | + requests_made_since_start: 52, |
| 219 | + vectors_made_since_start: 2494, |
| 220 | + db_size: 2524, |
| 221 | + db_cache_size: 2533, |
| 222 | + state: "cooldown", |
| 223 | + queue_additions: false, |
| 224 | + vecdb_max_files_hit: false, |
| 225 | + vecdb_errors: {}, |
| 226 | +}; |
| 227 | + |
| 228 | +export const VECDB_STATUS_DONE: VecDbStatus = { |
| 229 | + files_unprocessed: 0, |
| 230 | + files_total: 0, |
| 231 | + requests_made_since_start: 54, |
| 232 | + vectors_made_since_start: 2535, |
| 233 | + db_size: 2629, |
| 234 | + db_cache_size: 2574, |
| 235 | + state: "done", |
| 236 | + queue_additions: false, |
| 237 | + vecdb_max_files_hit: false, |
| 238 | + vecdb_errors: {}, |
| 239 | +}; |
| 240 | + |
| 241 | +export const STUB_SUB_RESPONSE_WITH_STATUS = [ |
| 242 | + VECDB_STATUS_STARTING, |
| 243 | + // ...STUB_SUB_RESPONSE, |
| 244 | + VECDB_STATUS_PARSING, |
| 245 | + VECDB_STATUS_PARSING_2, |
| 246 | + VECDV_STATUS_PARISING_3, |
| 247 | + VECDB_STATUS_PARSING_4, |
| 248 | + VECDB_STATUS_COOLDOWN, |
| 249 | + VECDB_STATUS_DONE, |
| 250 | +]; |
| 251 | + |
| 252 | +export const STB_LOADING_VECDB = { |
| 253 | + VECDB_STATUS_STARTING, |
| 254 | + VECDB_STATUS_PARSING, |
| 255 | + VECDB_STATUS_PARSING_2, |
| 256 | + VECDV_STATUS_PARISING_3, |
| 257 | + VECDB_STATUS_PARSING_4, |
| 258 | + VECDB_STATUS_COOLDOWN, |
| 259 | + VECDB_STATUS_DONE, |
| 260 | +}; |
0 commit comments