Open11

Cline を導入する

kattsunkattsun

Meet Cline, an AI assistant that can use your CLI aNEditor.

へー。

kattsunkattsun

install したらサイドバーにアイコンが出てきたのでクリック。

Hi, I'm Cline

Hi, I'm Cline

I can do all kinds of tasks thanks to breakthroughs in Claude 3.7 Sonnet's agentic coding capabilities and access to tools that let me create & edit files, explore complex projects, use the browser, and execute terminal commands (with your permission, of course). I can even use [[MCP]] to create new tools and extend my own capabilities.

To get started, this extension needs an API provider for Claude 3.7 Sonnet.

While Cline currently requires you bring your own API key, we are working on an official accounts system with additional capabilities. Subscribe to our mailing list to get updates!

kattsunkattsun

API Provider めっちゃある

  • OpenRouter
  • Anthropic
  • AWS Bedrock
  • OpenAI Compatible
  • GCP Vertex AI
  • Google Gemini
  • DeepSeek
  • Mistral
  • OpenAI
  • VS Code LM API
  • Requesty
  • Together
  • Alibaba Qwen
  • LM Studio
  • Ollama
  • LiteLLM
  • AskSage
  • X AI

LLM の選択と API Key の設定は初期設定で必要らしい。(ref: Clineっておいしいの?おいしいです!)
OpenAI を選んでみる

kattsunkattsun

API Key を入力したら画面が変わった。

Help Improve Cline

Send anonymous error and usage data to help us fix bugs and improve the extension. No code, prompts, or personal information is ever sent.

You can always change this in settings.

→ Deny を選択

🎉 New in v3.5

  • Introducing MCP Marketplace: Discover and install the best MCP servers right from the extension, with new servers added regularly! Get started by going to the MCP Servers tab.

↓このブロックが積み重なってるアイコンが「MCP Servers tab」への導線だった

  • Mermaid diagrams in Plan mode! Cline can now visualize his plans using flowcharts, sequences, entity-relationships, and more. When he explains his approach using mermaid, you'll see a diagram right in chat that you can click to expand.

「Plan」モードは入力フォームの直下に

  • Use @terminal to reference terminal contents, and @git to reference working changes and commits!
  • New visual indicator for checkpoints after edits & commands, and automatic checkpoint at the start of each task.

See a demo of the changes here!

Join us on X, discord, or r/cline for more updates!

What can I do for you?

Thanks to Claude 3.7 Sonnet's agentic coding capabilities, I can handle complex software development tasks step-by-step. With tools that let me create & edit files, explore complex projects, use the browser, and execute terminal commands (after you grant permission), I can assist you in ways that go beyond code completion or tech support. I can even use MCP to create new tools and extend my own capabilities.

Auto-approve:None

kattsunkattsun

Ruby 約数を求める]]ときに使った divisors 関数のリファクタを指示してみる。

def divisors(n)
  n.prime_division.inject([1]) do |ary, (p, e)|
    (0..e).map{ |e1| p ** e1 }.product(ary).map{ |a, b| a * b }
  end.sort
end

To refactor the divisors function, I need to locate its definition in the codebase. Given the open tabs and visible files, it might be in one of the Ruby files. I will perform a search across the project to find the definition of divisors.

Cline wants to search this directory for \bdef\s+divisors\b:

atcoder-archive/(*.rb)‎

Found 1 result.

others/tessoku-book/b02/s.rb
│----
│def divisors(n)
│  n.prime_division.inject([1]) do |ary, (p, e)|
│----

approve する

kattsunkattsun

これも approve

The divisors function is defined in others/tessoku-book/b02/s.rb. I will read the contents of this file to understand the function's implementation and identify opportunities for refactoring.

Cline wants to read this file:

others/tessoku-book/b02/s.rb‎

kattsunkattsun

うおお動いた。より説明的にリファクタしてくれたらしい。

The divisors function calculates all divisors of a number n using its prime factorization. The function uses prime_division to get the prime factors and their exponents, then generates all combinations of these factors to find the divisors.

To refactor this function, I can improve readability and potentially optimize the code. One way to do this is by breaking down the logic into smaller, well-named methods or using more descriptive variable names. I will proceed with refactoring the function.

Cline wants to edit this file:

others/tessoku-book/b02/s.rb‎

kattsunkattsun

Save を押して変更を反映。

The divisors function in others/tessoku-book/b02/s.rb has been successfully refactored for improved readability. The logic has been broken down into smaller, well-named sections, making it easier to understand and maintain. The function now clearly separates the calculation of powers and the generation of divisors. If you have any further tasks or need additional modifications, feel free to let me know!