Skip to main content

Interactive Mode

Feature Overview: iFlow CLI provides multiple flexible interaction methods, supporting text input, image processing, file references, and intelligent multimodal processing.

Learning Time: 10-15 minutes

Prerequisites: iFlow CLI installed and configured, understanding basic command line operations

What is Interactive Mode

Interactive mode is the core functionality of iFlow CLI, allowing users to engage in natural conversations and collaboration with AI through multiple methods. The system supports various input forms including text, images, and file references, and provides intelligent multimodal processing capabilities that enable any model to "understand" image content.

Core Features

FeatureDescriptionPlatform Support
Multiple Input MethodsVarious input forms including text, images, file referencesAll platforms
Intelligent Multimodal ProcessingEnables any model to "understand" image contentAll platforms
Automatic Content DetectionIntelligently recognizes and processes different types of input contentAll platforms
Large Text OptimizationAutomatically handles long text with optimized interface displayAll platforms
Real-time ResponseProcesses user input in real-time without waitingAll platforms

How It Works

Input Processing Flow

User Input → Content Type Detection → Preprocessing → Model Adaptation → AI Response

[Text/Image/File] → [Auto Recognition] → [Format Optimization] → [Multimodal Processing] → [Generate Reply]

Intelligent Adaptation Mechanism

  • Text Input: Directly passed to AI model for processing
  • Image Input: Automatically detects model capabilities, generates image descriptions when necessary
  • File References: Reads file content and integrates into conversation context
  • Mixed Input: Intelligently combines different types of input content

Detailed Feature Description

Text Input

Single Line Text

Directly input your questions or instructions in the command line interface:

> Help me optimize the performance of this React component

Multi-line Text Input

Supports multiple methods for multi-line text input:

MethodOperationDescription
Backslash newline\ + EnterQuick multi-line input creation
Shift + EnterShift + EnterAvailable after terminal configuration

Example:

> Please help me implement a user management system, including:\
1. User registration and login functionality
2. User information CRUD operations
3. Permission management
4. Data persistence

Image Processing

Supported Image Formats

FormatExtensionsDescription
PNG.pngHigh-quality images with transparency support
JPEG.jpg, .jpegCompressed image format
GIF.gifSupports animated images
WebP.webpModern image format
BMP.bmpBitmap format

Image Input Methods

Screenshot Pasting

PlatformScreenshot ShortcutPaste Shortcut
WindowsWin + Shift + SCtrl + V
macOSCmd + Shift + 4Cmd + V
LinuxPrtScn or othersCtrl + V

Operation steps:

  1. Use system screenshot tool to capture the screen area you want to analyze
  2. Press paste shortcut in iFlow CLI
  3. System automatically generates image placeholder and processes it

File Pasting

  • Copy image files in file manager
  • Use paste shortcut in CLI

Display effect after pasting:

> [Pasted image #1] What's wrong with this interface?

Note that native terminals, iTerm terminals, and IDE built-in terminals will forcibly filter out image paste events, causing image pasting to fail when using platform native paste shortcuts (for example, using Cmd + V to paste images on macOS is ineffective). In this case, you can use Ctrl + V or Shift + Ctrl + V to bypass this filter and paste images.

Image Processing Examples

> [Pasted image #1] Please analyze the design issues of this user interface
> [Pasted image #2] Which of these two interface layouts is better?
> Help me write the corresponding CSS code based on [Pasted image #1] this design draft

Large Text Processing

Automatic Detection Rules

Detection ItemThresholdProcessing Method
Long text paste>800 charactersGenerate text placeholder
Long content display>5000 charactersTruncated display optimization
Placeholder format-[Pasted text #X +Y lines]

Interface Optimization Features

  • Visual Simplicity: Avoids long text causing scrolling chaos in terminal
  • Content Integrity: Although display is optimized, model still receives complete original text
  • Smart Truncation: Shows first 2000 characters and last 2000 characters, with middle content collapsed
  • Clear Identification: Placeholder clearly identifies text block line count for easy content scale recognition

Usage Examples

> Please help me refactor this code: [Pasted text #1 +45 lines]
> Analyze the errors in this log file: [Pasted text #2 +120 lines]

Operation Flow

  1. Copy large amounts of text content to clipboard
  2. Press Ctrl/Cmd + V in CLI
  3. System automatically generates placeholder and saves original content
  4. Continue inputting your questions or instructions

File References

Reference Methods

TypeSyntaxExample
Single file@filepath@src/App.tsx
Directory reference@directorypath@src/components
Multiple filesSpace separated@file1.ts @file2.ts

Usage Examples

Single File Reference

> Help me optimize the @src/components/UserProfile.tsx component
> Please explain the API design philosophy in @docs/api.md

Directory Reference

> Analyze the utility functions in the @src/utils directory
> Refactor the component structure in the @src/components directory

Multiple File References

> Compare the differences between @src/old-component.tsx and @src/new-component.tsx
> Optimize project structure based on @package.json and @tsconfig.json configurations

Intelligent Multimodal Processing

Core Features

The unique aspect of iFlow CLI lies in its intelligent multimodal processing mechanism, enabling any model to "see" images.

How It Works

Automatic Image Description Generation

StepOperationDescription
1Model capability detectionChecks if main model supports multimodal
2Multimodal callAutomatically calls multimodal model when not supported
3Description generationGenerates detailed image description information
4Content integrationPasses description to main model for processing

Description Content Includes

  • Overall layout and composition
  • Main objects and positional relationships
  • Color information and visual features
  • Text content (complete transcription)
  • Background environment and detail features

Registration Configuration

iFlow AI Login Method

ItemDescription
Recommended ChoiceSystem-provided models are all optimized
Automatic ProcessingAutomatically uses qwen-vl-max to generate image descriptions
Configuration NeedsNo manual configuration needed, fully automated

OpenAI Compatible Login Method

Configuration ItemDescriptionRequired
Main model nameSpecify the primary model to useYes
Multimodal modelUsed for image description generationNo
Skip configurationSend directly to main modelNo

Performance Notes

ItemDescription
AdvantageEnables all models to have image understanding capabilities
NoteNon-multimodal models process images slightly slower (because image descriptions need to be generated first, then input to the main model for understanding)
RecommendationFor frequent multimodal needs, recommend using multimodal models directly

Keyboard Shortcuts

Basic Shortcuts

FunctionShortcutDescription
Cancel operationCtrl/Cmd + CCancel current input or generation
Exit programCtrl/Cmd + DExit CLI session
Clear screenCtrl/Cmd + LClear terminal screen
Command history↑/↓Browse command history
FunctionShortcutDescription
Paste contentCtrl/Cmd + VAutomatically detects images, text
Multi-line input\ + EnterBackslash newline
Multi-line inputShift/Option + EnterBased on terminal configuration

Vim Mode

After enabling with /vim command, supports:

OperationKeyDescription
Cursor movementh/j/k/lLeft/Down/Up/Right
Delete lineddDelete current line
Delete characterxDelete current character

Usage Examples

Common Scenarios

UI Design Analysis

> [Pasted image #1] Please analyze the user experience issues of this login page

Code Debugging

> [Pasted image #1] How to solve the problem shown in this error screenshot?

File Analysis

> Please analyze the performance issues of @src/components/Header.tsx and provide optimization suggestions

Complex Problems

> Please help me implement a user management system, including:\
1. User registration and login functionality
2. User information CRUD operations
3. Permission management
4. Data persistence

Best Practices

Image Usage Tips

  • UI Design Analysis: Screenshot interfaces then ask for design improvement suggestions
  • Code Debugging: Paste error screenshots to quickly locate problems
  • Document Understanding: Upload charts, flowcharts and other complex visual content
  • Comparative Analysis: Paste multiple images simultaneously for comparison

Text Processing Optimization

  • Large File Handling: Use automatic placeholder feature to handle long code or logs
  • Structured Questioning: Use multi-line input to organize complex questions
  • Context References: Combine @ file references to provide complete context

Model Selection Recommendations

  • Pure Text Tasks: Text models are sufficient and faster
  • Occasional Image Needs: Continue using text models, automatically handle images
  • Frequent Multimodal: Choose multimodal models for best experience

Troubleshooting

Common Issues and Solutions

IssuePossible CauseSolution
Image paste failureUnsupported format or no clipboard dataCheck image format, re-screenshot or copy
Invalid file referenceIncorrect path or file doesn't existConfirm file path is correct and file is accessible
Multi-line input abnormalTerminal configuration issueTry different newline shortcut combinations
Multimodal processing errorIncorrect model configurationCheck model support and configuration
Large text upload failureContent too large or network issuesUpload in segments or check network connection

Diagnostic Steps

  1. Permission Check

    • Confirm system allows CLI access to clipboard
    • Check file read permissions
  2. Network Connection

    • Confirm network connection is normal (multimodal processing requires API calls)
    • Check firewall settings
  3. Configuration Verification

    • Review error message information
    • Adjust operations based on prompts
    • Restart CLI to ensure configuration takes effect

Platform Compatibility

PlatformSupport StatusNotes
WindowsFull supportNote path separators
macOSFull supportSystem permissions may need authorization
LinuxFull supportDepends on system clipboard tools