Feat: add logjournal to room
This commit is contained in:
		| @@ -50,6 +50,14 @@ | |||||||
|     {{template "teamlist" .Room.RedTeam}} |     {{template "teamlist" .Room.RedTeam}} | ||||||
|   </div> |   </div> | ||||||
|   <hr /> |   <hr /> | ||||||
|  |   <div id="systembox"> | ||||||
|  |     Server says: <br> | ||||||
|  |     <ul> | ||||||
|  |     {{range .Room.LogJournal}}  | ||||||
|  |       <li>{{.}}</li> | ||||||
|  |     {{end}} | ||||||
|  |     </ul> | ||||||
|  |   </div> | ||||||
|   <div id="cardtable"> |   <div id="cardtable"> | ||||||
|     {{template "cardtable" .Room}} |     {{template "cardtable" .Room}} | ||||||
|   </div> |   </div> | ||||||
|   | |||||||
| @@ -40,20 +40,6 @@ type DSResp struct { | |||||||
| 	Object            string `json:"object"` | 	Object            string `json:"object"` | ||||||
| } | } | ||||||
|  |  | ||||||
| // type LLMResp struct { |  | ||||||
| // 	Choices []struct { |  | ||||||
| // 		FinishReason string `json:"finish_reason"` |  | ||||||
| // 		Index        int    `json:"index"` |  | ||||||
| // 		Message      struct { |  | ||||||
| // 			Content string `json:"content"` |  | ||||||
| // 			Role    string `json:"role"` |  | ||||||
| // 		} `json:"message"` |  | ||||||
| // 	} `json:"choices"` |  | ||||||
| // 	Created int    `json:"created"` |  | ||||||
| // 	Model   string `json:"model"` |  | ||||||
| // 	Object  string `json:"object"` |  | ||||||
| // } |  | ||||||
|  |  | ||||||
| type LLMResp struct { | type LLMResp struct { | ||||||
| 	Index           int    `json:"index"` | 	Index           int    `json:"index"` | ||||||
| 	Content         string `json:"content"` | 	Content         string `json:"content"` | ||||||
|   | |||||||
| @@ -84,6 +84,8 @@ type Room struct { | |||||||
| 	// ProgressPct uint32 `json:"progress_pct"` | 	// ProgressPct uint32 `json:"progress_pct"` | ||||||
| 	IsOver  bool | 	IsOver  bool | ||||||
| 	TeamWon UserTeam // blue | red | 	TeamWon UserTeam // blue | red | ||||||
|  | 	// needed for debug | ||||||
|  | 	LogJournal []string | ||||||
| } | } | ||||||
|  |  | ||||||
| func (r *Room) CanStart() error { | func (r *Room) CanStart() error { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Grail Finder
					Grail Finder