@@ -4,6 +4,14 @@ GitAI <- R6::R6Class(
44 initialize = function (project_id ) {
55
66 private $ .project_id <- project_id
7+ },
8+
9+ print = function () {
10+ cat(cli :: style_bold(" A " , cli :: col_yellow(" GitAI" ), " object: \n " ))
11+ private $ print_project_id()
12+ private $ print_files()
13+ private $ print_llm_data()
14+ private $ print_db_data()
715 }
816 ),
917
@@ -56,6 +64,37 @@ GitAI <- R6::R6Class(
5664 .gitstats = NULL ,
5765 .files = NULL ,
5866 .repos_metadata = NULL ,
59- .files_content = NULL
67+ .files_content = NULL ,
68+
69+ print_project_id = function () {
70+ cat(cli :: col_br_yellow(" Project ID:" ), private $ .project_id , " \n " )
71+ },
72+
73+ print_files = function () {
74+ if (is.null(private $ .files )) {
75+ cat(cli :: col_br_yellow(" Files:" ), cli :: col_grey(" not added" ), " \n " )
76+ } else {
77+ cat(cli :: col_br_yellow(" Files:" ),
78+ paste0(private $ .files , collapse = " , " )
79+ , " \n " )
80+ }
81+ },
82+
83+ print_llm_data = function () {
84+ if (is.null(private $ .llm )) {
85+ cat(cli :: col_br_yellow(" LLM:" ), cli :: col_grey(" not set" ), " \n " )
86+ } else {
87+ cat(cli :: col_br_yellow(" LLM:" ), " set" , " \n " )
88+ }
89+ },
90+
91+ print_db_data = function () {
92+ if (is.null(private $ .db )) {
93+ cat(cli :: col_br_yellow(" Database:" ), cli :: col_grey(" not set" ), " \n " )
94+ } else {
95+ browser()
96+ cat(cli :: col_br_yellow(" Database:" ), " set" , " \n " )
97+ }
98+ }
6099 )
61100)
0 commit comments