R/tool-sessioninfo.R
btw_tool_session_package_info.RdUses sessioninfo::package_info() to provide information about the loaded,
attached, or installed packages. The primary use case is to verify that a
package is installed; check the version number of a specific packages; or
determine which packages are already in use in a session.
btw_tool_session_package_info(
packages = "attached",
dependencies = "",
`_intent` = ""
)Which packages to show, or "loaded" to show all loaded
packages, "attached" to show all attached packages, or "installed" to
show all installed packages.
Whether to include the dependencies when listing package information.
An optional string describing the intent of the tool use. When the tool is used by an LLM, the model will use this argument to explain why it called the tool.
Returns a string describing the selected packages.
btw_tools(), btw_tool_session_platform_info()
Other Tools:
btw_tool_docs_package_news(),
btw_tool_env_describe_data_frame(),
btw_tool_env_describe_environment(),
btw_tool_files_code_search(),
btw_tool_files_list_files(),
btw_tool_files_read_text_file(),
btw_tool_files_write_text_file(),
btw_tool_ide_read_current_editor(),
btw_tool_package_docs,
btw_tool_search_packages(),
btw_tool_session_platform_info(),
btw_tool_web_read_url(),
btw_tools()
btw_tool_session_package_info("btw")
#> <btw::BtwPackageInfoToolResult>
#> @ value : chr "```\n package * version date (UTC) lib source\n btw * 1.0.0 2025-11-18 [1] local\n\n [1] /tmp/Rtmp5DMpg3/"| __truncated__
#> @ error : NULL
#> @ extra :List of 2
#> .. $ data :Classes ‘packages_info’ and 'data.frame': 1 obs. of 11 variables:
#> .. ..$ package : chr "btw"
#> .. ..$ ondiskversion: chr "1.0.0"
#> .. ..$ loadedversion: chr "1.0.0"
#> .. ..$ path : chr "/tmp/Rtmp5DMpg3/temp_libpath3eb6925f428a94/btw"
#> .. ..$ loadedpath : chr "/tmp/Rtmp5DMpg3/temp_libpath3eb6925f428a94/btw"
#> .. ..$ attached : logi TRUE
#> .. ..$ is_base : logi FALSE
#> .. ..$ date : chr "2025-11-18"
#> .. ..$ source : chr "local"
#> .. ..$ md5ok : logi NA
#> .. ..$ library : Factor w/ 4 levels "/tmp/Rtmp5DMpg3/temp_libpath3eb6925f428a94",..: 1
#> .. $ display:List of 1
#> .. ..$ markdown: chr "| package | ondiskversion | loadedversion | path | loadedpath | attached | is_base | date | source | md5ok | li"| __truncated__
#> @ request: NULL