You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: context_manager.go
    path of file: ./repos/werf/pkg/context_manager
    
    the code of the file until where you have to start completion: package context_manager

import (
	"archive/tar"
	"context"
	"crypto/sha256"
	"fmt"
	"io"
	"os"
	"path/filepath"

	"github.com/google/uuid"

	"github.com/werf/logboek"
	"github.com/werf/werf/pkg/path_matcher"
	"github.com/werf/werf/pkg/util"
	"github.com/werf/werf/pkg/werf"
)

func GetTmpDir() string {
	return filepath.Join(werf.GetServiceDir(), "tmp", "context")
}

func GetTmpArchivePath() string {
	return filepath.Join(GetTmpDir(), uuid.NewString())
}

func GetContextAddFilesPaths(projectDir, contextDir string, contextAddFiles []string) ([]string, error) {
	var addFilePaths []string
	for _, addFile := range contextAddFiles {
		addFilePath := filepath.Join(projectDir, contextDir, addFile)

		addFileInfo, err := os.Lstat(addFilePath)
		if err != nil {
			return nil, fmt.Errorf("unable to get file info for conte
    
func AddContextAddFilesToContextArchive(ctx context.Context, originalArchivePath, projectDir, contextDir string, contextAddFiles []string) (string, error) {
	destinationArchivePath := GetTmpArchivePath()

	pathsToExcludeFromSourceArchive := contextAddFiles
	if err := util.CreateArchiveBasedOnAnotherOne(ctx, originalArchivePath, destinationArchivePath, util.CreateArchiveOptions{
		CopyTarOptions: util.CopyTarOptions{ExcludePaths: pathsToExcludeFromSourceArchive},
		AfterCopyFunc: func(tw *tar.Writer) error {
			addFilePathsToCopy, err := GetContextAddFilesPaths(projectDir, contextDir, contextAddFiles)
			if err != nil {
				return err
			}

			for _, addFilePathToCopy := range addFilePathsToCopy {
				tarEntryName, err := filepath.Rel(filepath.Join(projectDir, contextDir), addFilePathToCopy)
				if err != nil {
					return fmt.Errorf("unable to get context relative path for %q: %w", addFilePathToCopy, err)
				}
				tarEntryName = filepath.ToSlash(tarEntryName)
				if err := util.CopyFileIntoTar(tw, tarEntryName, addFilePathToCopy); err != nil {
					return fmt.Errorf("unable to add contextAddFile %q to archive %q: %w", addFilePathToCopy, destinationArchivePath, err)
				}
				logboek.Context(ctx).Debug().LogF("Extra file was added to the current context: %q\n", tarEntryName)
			}
			return nil
		},
	}); err != nil {
		return "", err
	}

	return destinationArchivePath, nil
}