MCPcopy Create free account
hub / github.com/SpartanJ/eepp / showAttachFile

Method showAttachFile

src/tools/ecode/plugins/aiassistant/chatui.cpp:3176–3206  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3174// File picker
3175
3176void LLMChatUI::showAttachFile() {
3177 if ( getPlugin() == nullptr )
3178 return;
3179 hideSelectModel();
3180 hideSelectAgent();
3181 auto text = mLocateInput->getText();
3182 auto ctx = getPlugin()->getPluginContext();
3183 if ( !ctx->isDirTreeReady() ) {
3184 mLocateTable->setModel( ProjectDirectoryTree::emptyModel( {}, ctx->getCurrentProject() ) );
3185 mLocateTable->getSelection().set( mLocateTable->getModel()->index( 0 ) );
3186 } else if ( !mLocateInput->getText().empty() ) {
3187 ctx->getDirTree()->asyncMatchTree(
3188 ProjectDirectoryTree::MatchType::Fuzzy, text, 100,
3189 [this, text]( auto res ) {
3190 mUISceneNode->runOnMainThread( [this, res] {
3191 mLocateTable->setModel( res );
3192 mLocateTable->getSelection().set( mLocateTable->getModel()->index( 0 ) );
3193 mLocateTable->scrollToTop();
3194 updateLocateBarColumns();
3195 } );
3196 },
3197 ctx->getCurrentProject() );
3198 } else {
3199 mLocateTable->setModel( ctx->getDirTree()->asModel(
3200 100, {}, ctx->getCurrentProject(), Image::getImageExtensionsSupported() ) );
3201 mLocateTable->getSelection().set( mLocateTable->getModel()->index( 0 ) );
3202 }
3203 mLocateBarLayout->setVisible( true );
3204 mLocateInput->setFocus();
3205 updateLocateBarColumns();
3206}
3207
3208void LLMChatUI::hideAttachFile() {
3209 mLocateBarLayout->setVisible( false );

Callers

nothing calls this directly

Calls 15

isDirTreeReadyMethod · 0.80
asyncMatchTreeMethod · 0.80
getDirTreeMethod · 0.80
runOnMainThreadMethod · 0.80
scrollToTopMethod · 0.80
getTextMethod · 0.45
getPluginContextMethod · 0.45
setModelMethod · 0.45
setMethod · 0.45
getSelectionMethod · 0.45
indexMethod · 0.45
getModelMethod · 0.45

Tested by

no test coverage detected